vue-jest
vue-jest copied to clipboard
Wrong `scss` resources import.
If you import scss resources, All imports inside this resources will be broken. It will try to import styles base on Component file, not scss file
https://github.com/MaxKostenko/nuxt-vue-jest
It seems that there are two problems with imports from scss ressources:
- The content of files in
ressources.scssis just prepended to the components scss, loosing context for relative imports (https://github.com/vuejs/vue-jest/blob/v3/lib/compilers/scss-compiler.js#L34). A solution could be to prepend@import '/absolute/path/to/file'instead. - The importer does not support using
@import 'variables'to load@import 'variables/_index.scsswhich should work
While debugging we also where troubled by the silent dropping of files that could not be found (https://github.com/vuejs/vue-jest/blob/v3/lib/compilers/scss-compiler.js#L27).