Comments (3)
Wow, that was a wild goose chase and completely unrelated to Windi or Vue CLI
🙃
After removing all the Windi @apply content-
it exposed that Google font import as the last remaining syntax error.
Turns out Webpack doesn't like those semicolons between font weights.
webpack/webpack#10873
This works fine during npm run serve
and npm run lint
but fails during npm run build
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
Fixed with using an alternative Google font URL (css
instead of css2
, removing wght@
and ;
becomes ,
)
@import url('https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700&display=swap');
(and a lot of swearing)
from vue-cli-plugin-windicss.
Good recommendation! Thanks.
Replaced @import
with the standard Google <link>
to src/public/index.html
.
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
from vue-cli-plugin-windicss.
Oh that's weird! Thanks for the issue and explanation @sambedingfield
Can I recommend you go with the css2 font but add the import in your HML instead of the CSS. HTML is preferred because you're adding an extra network step to fetch the fonts inside the CS, which will decrease the CLS and LCP performance metrics
from vue-cli-plugin-windicss.
Related Issues (18)
- Color modify in tailwindcss.config.js not applied HOT 1
- Classes are ignored on index.html file HOT 2
- It does't work anyway. HOT 4
- Support @vue/cli-service v5 beta HOT 2
- Using Vue Cli, import windi.css fails HOT 5
- 当有ant vue的包的时候 在npm run serve 会卡住
- 当我同时使用ant-design-vue与windicss的时候 npm run serve 会卡住
- Important Prefix not working or causes SassError HOT 1
- Cannot read properties of undefined (reading 'content') HOT 3
- import 'windi.css' This dependency was not found
- utility groups won't work when building project
- pnpm install vue-cli-plugin-windicss failed HOT 3
- To get the last version of windi - do I have to wait for a new version of this library? HOT 2
- error [email protected]: The engine "node" is incompatible with this module. Expected version "^12.20.0 || ^14.13.1 || >=16.0.0". Got "12.19.0"
- use vue-cli-plugin-windicss, the import statement in router is invalid HOT 4
- Cannot read property 'extraTransformTargets' of undefined HOT 5
- An incomprehensible bug.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-cli-plugin-windicss.