When using the CSS property in nuxt.conf.js as explained here, trying to load a *.scss or *.sass file, following error shows in the console:
This relative module was not found:
../assets/main.scss in ./node_modules/babel-loader/lib?{"presets":["vue-app"],"babelrc":false,"cacheDirectory":true}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./.nuxt/App.vue
CSS files work as expected.
nuxt.conf.js:
module.exports = {
...
css: [{
src: '~assets/main.scss', lang: 'scss'
}],
...
};
Created through vue init nuxt/starter with Nuxt version 1.0.0-rc3.
Did you install node-sass and sass-loader?
Thank you very much, that solved it :) They need to be locally (not -g) installed.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Did you install node-sass and sass-loader?