So, you created a new boilerplate site using Nuxt.js. Now what?
Well, maybe you'll want to use a CSS framework to get started with styli...
For further actions, you may consider blocking this person and/or reporting abuse
Thanks.
I only need the first part, however, to get that working I had to install the sass loader too.
npm install --save-dev node-sass sass-loader
Good point; I guess I've gotten in the habit of adding
node-sass
,sass-loader
, andurl-loader
/file-loader
to my Nuxt projects so much it's second nature.And
core-js@2
, up until I started usingnuxt-edge
...Using this method does not generate custom-color classes for me.. like has-background-secondary where secondary is my custom color created in Bulma. Any idea how to fix this?
I do happen to know that using this method you can't assign a Bulma variable to a custom SCSS variable, only a value, so I probably made a mistake somewhere along the line. Thanks for pointing this out, BTW. Perhaps bulma.io/documentation/customize/w... (or at least the last half of it) could help?
Yeah i now did it by using an extra nuxt module
@nuxtjs/style-resources
that loads my styles.scss and then if i also load it using the css property in nuxt i get what i want but i do have the feeling its now loading and generating more css then it should since a lot of classes are being there twice. Purgeing my css does not seem to fix that.Are you using github.com/Developmint/nuxt-purgecss? Because that's the only way I got PurgeCSS to work. If I'm not mistaken, you otherwise should be doing it right.
This is really awesome. nuxt is really heaven-sent. Thanks for sharing. Do you have any resources on persisting vuex data on page refresh?
You're in luck - here you go:
Just import this sucker in
nuxt.config.js
like so:plugins: [
'~/plugins/vuex-persistence
]
thank you. This worked like a charm. Looking forward to reading more from you!
Can we just use font-awesome as CSS with fonts from the packages?
That's totally a legitimate way of doing it; you could even load the CSS from a CDN and import it in
nuxt.config.js
in thecss:
option if I'm not mistaken. In fact, it's easier in a lot of ways.The three main reasons I chose to do it the way I did are:
For one reason or another, I like to programmatically load in only the icons I need (even though it isn't easier as such).
I've got no scientific proof here, but I'm fairly certain using only the SVG icons you need decreases the bundle size by ~20-30KB
I already was using several custom fonts in the project, and I didn't feel like adding another one to the mix.