-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
node_modules resolve not working with @import for SCSS #72
Comments
@davidungio I also ran into this today. What worked for me was to prefix the the import with @import "node_modules/@vhx/adventurine"; rather than @import "@vhx/adventurine"; |
Does However I think you can use includePaths option to make this work: postcss({
use: [
['sass', {
includePaths: [path.resolve('node_modules')]
}]
]
}) |
btw in |
I also encountered this problem. I used bili to configure // bili.config.js
const path = require('path');
module.exports = {
postcss: {
use: [
[
'sass',
{
includePaths: [path.resolve('node_modules')],
},
],
],
},
}; but this error occurred: $ bili
🚨(postcss) /xxx/xxx.scss:1:0: Unknown word
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser 🤔Is my configuration wrong? |
This is working for me! postcss({
modules: true,
extensions: ['.css', '.sass', '.scss'],
namedExports: true,
use: [
[
'sass', {
includePaths: [path.join(__dirname, 'scss')]
}
]
]
}) |
I'm running into this error msg when I'm trying to
@import
a .scss file from mynode_modules
folder via this method:Results in this error:
[!] (postcss plugin) Error: File to import not found or unreadable: react-input-range/src/scss/index.scss.
However, if I include the entire relative path to the .scss, that'll work:
and this works as well
I need to import the .scss to override the SASS variables, so can't make use of of the .css file. I can't seem to figure out the cause and need some assistance with my issue, thanks!
So to reiterate:
Component.scss
rollup.config.js
The text was updated successfully, but these errors were encountered: