Open ccleve opened 4 years ago
Seems like a sass-loader related problem. I use the following config in nuxt.config.js and get the same error
build: {
/*
** You can extend webpack config here
*/
extend (config, { loaders: { sass }}) {
sass.sassOptions.includePaths = ["./node_modules"]
}
}
Personally I use Nuxt Components with a custom derivative of this package as Vue SFCs (@keeer/material-components-nuxt
). The config is as follows:
components: [
'~/components',
{ path: '~/node_modules/@keeer/material-components-nuxt/components', prefix: 'm-' },
],
build: { loaders: { scss: { additionalData: '@import \'~/assets/styles.scss\';\n' } } },
Describe the bug This is similar to #529. It does not seem possible to get paths to resolve when using Nuxt.
To Reproduce
The compiler will generate this error:
It appears to have something to do with the sass-loader not being able to resolve paths. A bit of googling finds the error, but none of the solutions for configuring sass-loader in Nuxt seem to work.
Expected behavior I expect the material package to be able to resolve its own dependencies.
Desktop (please complete the following information): Mac Firefox