-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
I'm running into this error msg when I'm trying to @import a .scss file from my node_modules folder via this method:
@import "react-input-range/src/scss/index.scss";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:
@import "../../../../../../node_modules/react-input-range/src/scss/index.scss";and this works as well
@import "react-input-range/lib/css/index.css";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
// Works
@import "react-input-range/lib/css/index.css";
@import "../../../../../../node_modules/react-input-range/src/scss/index.scss";
// Does not work
@import "react-input-range/src/scss/index.scss";rollup.config.js
import easyImport from "postcss-easy-import";
import postcssFlexbugsFixes from 'postcss-flexbugs-fixes';
import autoprefixer from "autoprefixer";
postcss({
sourceMap: true,
minimize: true,
modules: true,
namedExports: true,
plugins: [
easyImport,
postcssFlexbugsFixes,
autoprefixer({
browsers: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie < 9', // React doesn't support IE8 anyway
],
flexbox: 'no-2009',
}),
],
extract: path.resolve("./dist/style.css"),
}),vedtam and ctrlplusb
Metadata
Metadata
Assignees
Labels
No labels