egoist / vue-compile

Compile the blocks in Vue single-file components to use JS/CSS instead of Babel/Sass/Stylus.
MIT License
159 stars 10 forks source link

cannot find "@import '@scope/styles'" in Lerna projects #159

Open mesqueeb opened 4 years ago

mesqueeb commented 4 years ago

Error

I have this error:

Error: Can't find stylesheet to import.
   ╷
28 │ @import '@planetar/styles'
   │         ^^^^^^^^^^^^^^^^^^
   ╵
  src/components/ApiCard.vue 28:9  root stylesheet
    at Object._newRenderError (/Users/lucaban/ghq/github.com/mesqueeb/planetar/node_modules/sass/sass.dart.js:14379:19)

My project is a Lerna project.

ApiCard.vue has this style:

<style lang="sass" scoped>
@import '@planetar/styles'

and the @planetar/styles is a symlink inside the node_modules folder.

Reproduction steps

clone cycraft/planetar from github from its default branch

npm I
lerna bootstrap
npm run build
egoist commented 4 years ago

Can you try @import '~@planetar/styles' to see if it works?