-
Notifications
You must be signed in to change notification settings - Fork 108
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
[vite-plugin-ruby:assets-manifest] Cannot read property 'substr' of undefined #55
Comments
Thanks for the report, must be a bug in 2.0.0 since every asset in the bundle is expected to have a name, which given the bug is not true for images. Using a previous version of I don't have my computer until next weekβI'll investigate and create a patch. |
This comment has been minimized.
This comment has been minimized.
After move images folder into entrypoints, it can work and the
body {
background: url('/images/hg.png');
} <img src="<%= vite_asset_path 'images/hg.png' %>" /> |
The |
@ElMassimo Thanks, it seems if want use vite with rails, another way is move images folder to
If the assets entry move out the
then we can use |
I've created a PR for vite to solve the issue. vitejs/vite#3050, it also can solve custom manifest format problem. |
Asset duplication because of put images in entrypoints folder, import.meta.globEager('../images/**/*') |
I also came across this problem, Is there any workaround for this problem? |
I'm working on that, i'll submit a new PR to solve the two problem. |
Hi folks, adding the name to asset chunks would certainly simplify the internals of this library. In the meantime (and to provide support to users in older Vite versions), I have fixed the build manifest error when referencing other assets, as well as the duplication problem in Please upgrade, and let me know how it goes. |
@ElMassimo It works, thanks. |
ElMassimo has done the great work. At beginning, my plan is to move vite |
Description π
When use image in stylesheet and run build, got error
Reproduction π
just add css like this in
application.scss
Vite Ruby Info
Run
bin/rake vite:info
and provide the output:Logs π
If not providing a reproduction:
Output
Run
DEBUG=vite-plugin-ruby:* bin/vite dev
orDEBUG=vite-plugin-ruby:* bin/vite build
and provide the output:The text was updated successfully, but these errors were encountered: