vue scss
npm install sass-loader node-sass style-loader --save-dev
vue scss
npm install sass-loader node-sass style-loader --save-dev
setup scss in vue
npm i node-sass sass-loader
// create the path: styles/main.scss in your src directory
–src
|––styles
|––main.scss
// add this to your vue.config.js file in the root directory
module.exports = {
css: {
loaderOptions: {
sass: {
prependData: `@import "@/styles/_variables.scss";`
}
}
}
};
vue.js use scss in balise style
// in terminal
// If you use npm
npm install sass-loader node-sass --save-dev
// If you use yarn
yarn add sass-loader node-sass
// In your component
<style lang="scss">
// ...
</style>
vue js sass
# /!\ if you work with [email protected], it seems [email protected] doesn't work
# So, in terminal:
yarn add node-sass [email protected]
vue sass loader
<style lang="scss">
/* write SCSS here */
</style>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us