[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSR in production #482

Closed
benbonnet opened this issue Jul 18, 2024 · 1 comment
Closed

SSR in production #482

benbonnet opened this issue Jul 18, 2024 · 1 comment
Labels
bug: pending triage Something doesn't seem to be working, but hasn't been verified

Comments

@benbonnet
Copy link
benbonnet commented Jul 18, 2024

More or less to report, i was trying out the recent evil martians intertiajs post and trying to get further with the vite ssr capabilities.
As of now, unsure if the example repo is enough to get things running, hopefully seeking here some further guidance.

Bug encountered below.


  • [yes] I have tried upgrading by running bundle update vite_ruby.
  • [yes] I have read the [troubleshooting section] before opening an issue.

Description 📖

Taking the vite ssr example (https://github.com/ElMassimo/inertia-rails-ssr-template), trying to run in "production" mode.

  • build : RAILS_ENV=production bundle exec rails assets:precompile works ok
  • run : PORT=3000 RAILS_ENV=production overmind start fails

Logs 📜

web    | file:///xxxxx/inertia-rails-ssr-template/public/vite-ssr/ssr.js:5
web    | const pages = import.meta.globEagerDefault("../pages/*.jsx");
web    |                           ^
web    | 
web    | TypeError: (intermediate value).globEagerDefault is not a function
@benbonnet benbonnet added the bug: pending triage Something doesn't seem to be working, but hasn't been verified label Jul 18, 2024
@ElMassimo
Copy link
Owner

Hi Ben!

globEagerDefault was an internal API in Vite which was removed in favour of passing options to glob:

import.meta.glob('../pages/*.jsx', { import: 'default', eager: true }),

Please use Discussions instead of Issues if you have additional questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: pending triage Something doesn't seem to be working, but hasn't been verified
Projects
None yet
Development

No branches or pull requests

2 participants