-
Notifications
You must be signed in to change notification settings - Fork 23
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
Build fails with "Can't find stylesheet to import." if injectGlobalPaths is used #49
Comments
reason is that So resolving the paths injectGlobalPaths is errornous and causes an error on the dart sass package. |
@jase88 Is there any workaround for this issue? For me this feature is completely broken right now :( |
I'm also having issues with this. |
So what this global path does is just adding your globals to the head of each scss file with So the only workaround I can think of would be a own script that automatically writes your global files at the top :/ |
Thanks @jase88 that helps! |
You could try version 2.0.0-0, which is released 13 days ago but with dist-tag |
I just faced the same issue while trying to move my NPM monorepo to Nx workspaces, what worked for me with plugins: [
sass({
injectGlobalPaths: [`${__dirname}/src/globals/variables.scss`],
}),
], Hope it helps 🙂 |
@dgonzalezr This works for me! Nice man thanks! |
Even with the solution proposed by @dgonzalezr , I'm getting the same "Can't find stylesheet to import" error. Is there any updates on this issue? |
We are seeing the same issue, but fixed on Mac/Linux when using the fix from @dgonzalezr. It still doesn't work on Windows though. |
This fixed the issue on Windows:
|
Indeed, my solution only works on Unix, I was struggling with the same issues on Windows, @jaredtbates you've "saved my life" 😆 ))) |
Hello, guys, if you have worked before with sass, the imports are usually @import 'my-sass-file', without extension. Also many times we are not used to use './......' in our imports, for which this could be helpful:
I hope it helps. |
Current Behavior
If using injectGlobalPaths parameter
the build fails with
If I leave out the parameter, the builds succeeds.I suspect the path resolution not working correctly on my nx workspace, because it works on a simple stencil project.
Expected Behavior
using injectGlobalPaths parameter should work without causing issues
Context (Environment)
Steps to Reproduce
nx build web-components
The text was updated successfully, but these errors were encountered: