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
I took me a while to notice because the dev command was still working fine. Also if I remove vite-plugin-linaria from the vite.config.ts, the build works again. So I had a look into the commit that broke the build and it happened that I had added Web Fonts to the index.html:
So after playing around with the changes I had added to the file and when the build works and fails, I figured the issue is the three letters css in the href attribute that caused my build to fail. Also if I put the word css anywhere else in the index.html the build will fail.
Not sure how why this happens but I guess this somehow makes the html file match some css pattern and vite trying to parse it as such. 🤔
Reproduce
create a new react-ts project with npm init @vitejs/app
install linaria, vite-plugin-linaria and add it to the config
add the word css anywhere in the index.html
run the vite build
The text was updated successfully, but these errors were encountered:
Can confirm this happens in css files as well - both in comments and in actual css (e.g. content: 'cssblah' in an :after block, or color: 'cssfoo') - fortunately it doesn't affect jsx, tsx, ts or js files. Guessing it's an upstream bug in the @linaria/babel-preset package.
First of all, thanks for that nice plugin!
Description
I am using it for a small project and noticed that my builds have started failing a few days ago with following error message:
I took me a while to notice because the dev command was still working fine. Also if I remove
vite-plugin-linaria
from thevite.config.ts
, the build works again. So I had a look into the commit that broke the build and it happened that I had added Web Fonts to theindex.html
:So after playing around with the changes I had added to the file and when the build works and fails, I figured the issue is the three letters
css
in the href attribute that caused my build to fail. Also if I put the wordcss
anywhere else in the index.html the build will fail.Not sure how why this happens but I guess this somehow makes the html file match some css pattern and vite trying to parse it as such. 🤔
Reproduce
npm init @vitejs/app
vite-plugin-linaria
and add it to the configcss
anywhere in theindex.html
The text was updated successfully, but these errors were encountered: