In my Vue component, I changed the language from the default CSS to the explicitly set SCSS, like this.
<style lang="scss"> div.bordy{ border: solid 3px red; } </style> I also changed the webpack.config.js according to this post by LinusBorg, so it looks like this.
module.exports = { entry: ["babel-polyfill", "./index.js"], output: { path: __dirname, filename: "bundle.js" }, module: { loaders: [ { test: /\.js$/, loader: "babel", exclude: /node_modules/ }, { test: /\.vue$/, loader: "vue" }, // { test: /\.scss$/, loader: 'style!css!sass' }, { test: /\.s[a|c]ss$/, loader: "style!css!sass" } ] }, babel: { presets: ["es2015", "stage-3"], plugins: ["transform-runtime"] }, vue: { loaders: [{ scss: "style!css!sass" }] }, resolve: { alias: { "vue$": "vue/dist/vue.common.js" } } } The guy explains that by doing so, we catch SCSS and map it to SASS. However, I'm getting an error saying the following.
Module not found: Error: Cannot resolve module 'scss-loader'
I've tried installing the packages as shown below but it gave no difference in the output error.
npm install scss-loader --save-dev Here, I get uncertain and googlearching leads me to more confusion because I'm reading hints in all possible directions, not rarely commented with angry shouts of not resolving the issue.
Should I use style lang="sass" to being with?
When I try that, I have to install node-sass and I'm not sure if I'm resolving the problem or hiding it...