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
CSS files included in additionalInputs are converted to empty javascript files when built, in addition to a style.css file in the root folder.
As an example, if you have the file src/test.css, it gets converted to dist/src/test.js and dist/style.css (this exhibits the same issue as described in this comment).
While importing the css file from javascript is a workaround for this issue, it does not cover all use cases, specifically, I'd like to link to a css file dinamically depending on user preferences and right now that's impossible.
@ttoino
This issue really annoyed me since I transitioned from CRXJS to this since the former did the copying of files for me automatically including the images, I resorted to just copy the folder structure where I put my static files to the public folder.
My src folder with the static assets:
src
L assets
L fonts
| L font.ttf
L css
| L index.css
| L normalize.css
L icons
L logo.png
L logo_16.png
L logo.svg
My public folder:
public
L src
L assets
...
vite will copy them to the src folder in the outdir (usually dist)
Summary
CSS files included in
additionalInputs
are converted to empty javascript files when built, in addition to astyle.css
file in the root folder.As an example, if you have the file
src/test.css
, it gets converted todist/src/test.js
anddist/style.css
(this exhibits the same issue as described in this comment).While importing the css file from javascript is a workaround for this issue, it does not cover all use cases, specifically, I'd like to link to a css file dinamically depending on user preferences and right now that's impossible.
Reproduction
test-extension.zip
Environment
The text was updated successfully, but these errors were encountered: