Skip to content

Sass imports not working from node_modules #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Truemedia opened this issue Jan 14, 2019 · 0 comments
Open

Sass imports not working from node_modules #48

Truemedia opened this issue Jan 14, 2019 · 0 comments

Comments

@Truemedia
Copy link

Expected behavior

I'm using SFC (single file component) hybrid where my js and sass file are linked from my vue file. The sass file itself imports files located in installed packages in node_modules/. With webpack vue plugin these easily get resolved by prefix an npm sass dependency with ~

Actual behavior

I just get these errors regardless of the file I am trying to load from node modules (example package named mymodule with file.scss sitting in root of it):

(VuePlugin plugin) Error: Error: File to import not found or unreadable: ~mymodule/file.scss.

Steps to reproduce the behavior

Create an SFC file and change the SASS to be import from external SASS file:

<style lang="scss" src="./styles.scss"></style>

Import a sass file from the top of the SFC sass file:

import '~mymodule/file.scss'

Would massively appreciate a fix for this, spent hours finding dead ends and broken code for what seems like a very common use case.

@znck znck transferred this issue from vuejs/rollup-plugin-vue Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant