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
The manifest.json file emitted when build.manifest is true contains an object full of chunks, where some of those chunks have an assets array containing the path, relative to the output directory, of any assets referenced by that chunk.
For example if my stuff directory contains a file called text.txt, and I have a module like this...
For whatever reason, .css files are excluded from this array — in other words if my stuff directory also contains a styles.css file, it will not be included in assets. (Nor is it included in the chunk's css array, not that it should be.)
The same thing happens if you import the asset directly:
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
The
manifest.json
file emitted whenbuild.manifest
istrue
contains an object full of chunks, where some of those chunks have anassets
array containing the path, relative to the output directory, of any assets referenced by that chunk.For example if my
stuff
directory contains a file calledtext.txt
, and I have a module like this......then the chunk that contains that module will look something like this in the manifest:
For whatever reason,
.css
files are excluded from this array — in other words if mystuff
directory also contains astyles.css
file, it will not be included inassets
. (Nor is it included in the chunk'scss
array, not that it should be.)The same thing happens if you import the asset directly:
Reproduction
https://github.com/Rich-Harris/vite-glob-css
Steps to reproduce
npm install && npm run build
, then inspectdist/.vite/manifest.json
.System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: