Skip to content
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

Dependencies of Sass dependencies aren't loading #18

Closed
NathanBeddoeWebDev opened this issue Feb 6, 2023 · 2 comments
Closed

Dependencies of Sass dependencies aren't loading #18

NathanBeddoeWebDev opened this issue Feb 6, 2023 · 2 comments

Comments

@NathanBeddoeWebDev
Copy link

Summary
If you load a scss dependency with @use or @forward (probably @import as well), and that scss dependency has a dependency on a node_module, you get a
[ERROR] Can't find stylesheet to import. on the imported node_module file.

I'm guessing it's an issue with the includePaths or importers
https://github.com/pipe01/esbuild-plugin-vue3/blob/master/src/index.ts#L268

When I import the files directly from node_modules that it's saying it can't find, then it works.

Expected Behaviour
If you have an import/use/forwards in a scss file that's being imported in a vue SFC, it should not throw an error and the scss should be made available in that scope.

@NathanBeddoeWebDev
Copy link
Author

Adding path.join(process.cwd(), "node_modules") to the preprocessOptions.includePaths fixes this issue.

@NathanBeddoeWebDev
Copy link
Author

Should be resolved by the above merge. @pipe01 are we able to get a release out for this, looking forward to utilizing this plugin in our build system

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