I need to use SASS or SCSS in my project.
I used the vue-cli to make the latest version of a starter project.
Anyone had any success in making sass/scss work in the newest starter project with webpack?
I need to use SASS or SCSS in my project.
I used the vue-cli to make the latest version of a starter project.
Anyone had any success in making sass/scss work in the newest starter project with webpack?
you install the necessary dependencies
npm install -D node-sass sass-loader
for global styles, simply import the file into main.js
:
import './styles/my-styles.scss'
in .vue
files, add the lang to the <style>
element.
<style lang="scss">
If using webstorm:
<style lang="scss" rel="stylesheet/scss">