ibm-products
ibm-products copied to clipboard
SCSS Source maps invalid for index-full-carbon maybe others
What package(s) are you using?
- [x] Carbon for IBM Products (or Carbon for IBM Cloud & Cognitive)
- [ ] Legacy/CDAI
- [ ] Legacy/Security
Detailed description
When loading SCSS from index-full-carbon.css the source maps the source maps have an invalid path to the source files.
Numerous error reports like the following are shown. It appears to be targeting node_modules/node_modules/.
Steps to reproduce the issue
- Copy an example from the examples/carbon-for-ibm-products folder.
- npm run install
- npm run start
Additional information
This appears to be due to our build picking up SCSS files from outside the package being built.
In this case @carbon/carbon/layout/scss/_breakpoint.scss we reacy out of the package up to the top level.
Raised https://github.com/sass/sass/issues/3281
Issue closed by sass, stating that an addition to the CLI to deal with this will not be added. A post-processing step is suggested.
@matthewgallo Let’s look into whether this is still an issue for v11 and figure out how to prioritize from here.
This is now fixed in 1.34.1, confirmed with an app using react-scripts by running react-scripts build and no longer see source map errors