I've created nuxt project
vue init nuxt/starter <project-name>
In my nuxt.config.js
I added this:
css: [
{ src: '~assets/css/style.css', lang: 'css' }
]
and in my assets/css folder I have style.css with
body {
background: black!important;
}
But nothing happens with no errors on console. what to I do?
you must add to nuxt.config.js
build: {
extractCSS: true
}
For example,
css: [
{ src: '~assets/css/style.css', lang: 'css' }
],
build: {
extractCSS: true
}
And use nuxt v0.10.6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With