-
Notifications
You must be signed in to change notification settings - Fork 13
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
how to extract variables from files imported from node_modules? #3
Comments
@briancappello thanks for the report. The problem is that |
There's an example in the docs:
|
Any progress on this? Ran into this problem today. |
Same here. |
Using relative paths for importing 3rd-party sass-variables seems to works fine. Example: variables.scss @import '../../../node_modules/@blueprintjs/core/src/common/variables';
// other imports, local styles etc app.styles.js export const theme = require('sass-extract-loader?{"plugins": ["sass-extract-js"]}!../sass/variables.scss');
/* hack-hack */
export const GlobalStyles = createGlobalStyle`
.app {
background: ${theme.ptDarkAppBackgroundColor};
}
`; I guess, the problem is that when we do imports in scss-files, it's processed by sass-loader. |
@adi518, seems like your solution is a bit differ with @briancappello's question. |
Any progress? It's already more than a year.... The proposed workarounds aren't valid, as npm module resolution needs to do his work, and a node module could be installed higher up.... |
To add to this, webpack aliases are also not supported. |
Just started playing around with this, seems pretty cool! One problem I ran into however, as the title states:
file: _variables.scss
file: styles.js
This does not work :(
However, if I remove the tilda from the
@import
statement it does work (but i believe that breaks the scss, no?)Am I missing anything, or might this be a bug?
The text was updated successfully, but these errors were encountered: