Vue.js error when importing external .scss file


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 answer

  • answered 2018-11-08 07:43 ali afsah

    Problem resolved 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 explanation.

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