Closed JasonBarnabe closed 6 months ago
hey @JasonBarnabe did you solve it?
it seems related to this https://github.com/vitejs/vite/issues/15010
If you are using vite.config.ts
update it to vite.config.mts
Thanks for the suggestion, but that did not solve the issue.
We ended up adding the path to additionalEntrypoints
in vite.json and removing the import. Still not sure why this changed in 3.5.0.
bundle update vite_ruby
.Description π
After upgrading vite_ruby from 3.3.4 to 3.5.0, I'm getting an error while rendering pages:
ActionView::Template::Error:"Vite Ruby can't find site/pages/cart/images/browser-redirect.svg in the manifests.
. The generated flies atpublic/packs/vite/.vite/manifest.json
andpublic/packs/vite/.vite/manifest-assets.json
do not contain a reference to this file.It should be included because:
vite.json
includesapp/components/**/*_controller.js
underadditionalEntrypoints
.app/components/payment_processor/stripe_fields_component_controller.js
consists ofimport '~/site/pages/cart/images/browser-redirect.svg'
browser-redirect.svg
is atapp/javascript/site/pages/cart/images/browser-redirect.svg
On build, I see the message:
Generated an empty chunk: "app/components/payment_processor/stripe_fields_component_controller.js".
, however if I adjust the file to contain some actual JS and rebuild, I still get the error about the missing SVG.This all worked on 3.3.4.
Reproduction π
Repo is private, but I can provide some snippets or run debug commands if it's helpful.
Vite Ruby Info
_Run `bin/rake vite:info` and provide the output:_ ``` bin/vite present?: true vite_ruby: 3.5.0 vite_rails: 3.0.17 rails: 7.0.8 node: v20.11.0 npm: 10.2.4 yarn: 1.22.5 pnpm: 7.14.2 ruby: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux] installed packages: Simplero@0.0.20 /www/Simplero βββ¬ @vitejs/plugin-react@4.2.1 β βββ vite@5.0.11 deduped βββ¬ vite-plugin-mkcert@1.13.3 β βββ vite@5.0.11 deduped βββ¬ vite-plugin-relay@2.0.0 β βββ vite@5.0.11 deduped βββ¬ vite-plugin-ruby@5.0.0 β βββ vite@5.0.11 deduped βββ vite@5.0.11 ```