Answer the question
In order to leave comments, you need to log in
How to fix @import scss in vue.js?
I'm trying to migrate the template to Vue.js, but I'm getting an error importing scss files
App.vue
<style>
@import "./assets/scss/style.scss";
</style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-overflow-scrolling: touch;
text-decoration: none;
}
@import 'base/fonts';
body {
background: #000;
}
This dependency was not found:
* -!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!./base/fonts in ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./src/assets/scss/style.scss
To install it, you can run: npm install --save -!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!./base/fonts
Answer the question
In order to leave comments, you need to log in
Why are you importing so strangely?
Right in index.jsimport "./assets/scss/style.scss";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question