ibm-products icon indicating copy to clipboard operation
ibm-products copied to clipboard

SCSS Source maps invalid for index-full-carbon maybe others

Open lee-chase opened this issue 3 years ago • 4 comments

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/.

image

Steps to reproduce the issue

  1. Copy an example from the examples/carbon-for-ibm-products folder.
  2. npm run install
  3. npm run start

Additional information

lee-chase avatar Apr 01 '22 08:04 lee-chase

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.

lee-chase avatar Apr 05 '22 12:04 lee-chase

Raised https://github.com/sass/sass/issues/3281

lee-chase avatar Apr 05 '22 13:04 lee-chase

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.

lee-chase avatar Apr 07 '22 09:04 lee-chase

@matthewgallo Let’s look into whether this is still an issue for v11 and figure out how to prioritize from here.

elycheea avatar Aug 25 '22 17:08 elycheea

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

matthewgallo avatar Oct 20 '22 17:10 matthewgallo