Vue.js error when importing external .scss file

912 Views Asked by At


I'm importing .scss file in a vue component, but receiving this odd error. 'file not found' I'm sure the path of file is correct and don't know why getting this error?

Code:

<style lang="scss" scoped>
  @import './style.scss';
</style>
1

There are 1 best solutions below

1
On

Problem solved but don't know why!
When I removing 'scoped' tag, everything is back to normal. I find out a little bit about global and local styles in vue-loader in this:
https://vue-loader.vuejs.org/guide/scoped-css.html

But don't know why this happening.
Appreciate if some one can explain.

<style lang="scss">
  @import './style.scss';
</style>