You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If static assets are referenced in templates on backend (.twig, .blade, .latte, etc.), Vite will not process them and they are not included in manifest file.
A way how to get around that is described here #2375 (comment)
Suggested solution
rollupOptions.input should accept any kind of file type, including png, jpg, svg, etc and treat them as assets. This is not currently possible and are generated as empty chunks.
Generated an empty chunk: "fragment.svg"
Generated an empty chunk: "icon.png"
What about introducing option like build.assetsInput as string[] with glob paths?
And each glob could then include assets viaimport.meta.glob('/path/to/assets/**') perhaps? This way they could be added to build as described in #2375 (comment)
I use <img src="@images/picture.jpg" alt="" /> directly in a html and I also put the picture into rollupOptions.input, but it became an empty js after build, and there's a info like this:
Clear and concise description of the problem
If static assets are referenced in templates on backend (
.twig
,.blade
,.latte
, etc.), Vite will not process them and they are not included in manifest file.A way how to get around that is described here #2375 (comment)
Suggested solution
rollupOptions.input
should accept any kind of file type, includingpng
,jpg
,svg
, etc and treat them as assets. This is not currently possible and are generated as empty chunks.Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: