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
are extracted to files and the original URL is replaced by __VITE_ASSET_<hash>__. In CSS files this seems to be replaced to the proper asset during build but in JS files, the tag remains in the final bundle.
The font face then obviously does not work.
Reproduction
git clone https://github.com/Artur-/vite-vaadin-problem4
cd vite-vaadin-problem4
npm i
npm run build
grep __VITE_ASSET_ -R dist
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 https://github.com/vuejs/vue-next instead.
Artur-
changed the title
Importing a CSS into JS leaves __VITE_ASSET__ in the CSS file in a production build
Importing a CSS into JS leaves __VITE_ASSET__ in the JS file in a production build
Nov 9, 2021
Artur-
added a commit
to Artur-/vite
that referenced
this issue
Nov 17, 2021
Describe the bug
When importing CSS like
then assets like
are extracted to files and the original URL is replaced by
__VITE_ASSET_<hash>__
. In CSS files this seems to be replaced to the proper asset during build but in JS files, the tag remains in the final bundle.The font face then obviously does not work.
Reproduction
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: