I have the problem that mochapack does not seem to work together with the style resources loader.
packages that seem to produce the problem:
- "@vue/cli-plugin-unit-mocha": "~4.2.0",
- "vue-cli-plugin-style-resources-loader": "~0.1.4"
My vue.config.js
file:
const path = require("path");
module.exports = {
...
pluginOptions: {
"style-resources-loader": {
preProcessor: "scss",
patterns: [path.resolve(__dirname, "./src/assets/styles/*.scss")]
}
}
};
The single sass file that is included through the above config:
@import "~vue-select/src/scss/vue-select.scss";
It seems to load the vue-select.scss
correctly but then when interpreting this file it seems to loose its current directory and does not find the imported style.
Error log excerpt:
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
╷
1 │ @import "global/variables";
│ ^^^^^^^^^^^^^^^^^^
╵
/node_modules/vue-select/src/scss/vue-select.scss 1:9 @import
/src/components/HelloWorld.vue 1:9
See full detail error message and code: https://github.com/petritz/food-calculator-web/runs/560575367