Skip to content
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

[Bug] Webpack + Sass-Loader sourceMap support not possible #62

Open
fokusferit opened this issue Jul 18, 2017 · 2 comments
Open

[Bug] Webpack + Sass-Loader sourceMap support not possible #62

fokusferit opened this issue Jul 18, 2017 · 2 comments
Labels

Comments

@fokusferit
Copy link
Contributor

Basically the issue is related to libsass (sass/libsass#2312) which is used by node-sass (which is used by sass-loader in webpack).

During our prototyping we discovered two issues:

The error report for example is:

  throw new Error('Invalid mapping: ' + JSON.stringify({
      ^

Error: Invalid mapping: {"generated":{"line":1,"column":29588},"source":"webpack:///node_modules/wholesale-styleguide-scss/atoms/_buttons.scss","original":{"line":46,"column":-17},"name":null}
    at SourceMapGenerator_validateMapping [as _validateMapping] (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/source-map/lib/source-map-generator.js:277:13)
    at SourceMapGenerator_addMapping [as addMapping] (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/source-map/lib/source-map-generator.js:101:12)
    at /Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/source-map/lib/source-node.js:345:13
    at SourceNode_walk [as walk] (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/source-map/lib/source-node.js:224:9)
    at SourceNode_walk [as walk] (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/source-map/lib/source-node.js:220:13)
    at SourceNode_walk [as walk] (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/source-map/lib/source-node.js:220:13)
    at SourceNode_toStringWithSourceMap [as toStringWithSourceMap] (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/source-map/lib/source-node.js:336:8)
    at ConcatSource.proto.sourceAndMap (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/webpack-sources/lib/SourceAndMapMixin.js:30:32)
    at /Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:66:35
    at Array.map (native)
    at /Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:53:85
    at Array.forEach (native)
    at Compilation.<anonymous> (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:52:12)
    at Compilation.applyPlugins1 (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/tapable/lib/Tapable.js:75:14)
    at self.applyPluginsAsync.err (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/webpack/lib/Compilation.js:639:11)
    at next (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/tapable/lib/Tapable.js:138:11)
    at Compilation.compilation.plugin (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/webpack/lib/ProgressPlugin.js:117:6)
    at next (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/tapable/lib/Tapable.js:140:14)
    at Compilation.compilation.plugin (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/webpack/lib/optimize/UglifyJsPlugin.js:230:5)
    at Compilation.applyPluginsAsyncSeries (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/tapable/lib/Tapable.js:142:13)
    at self.applyPluginsAsync.err (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/webpack/lib/Compilation.js:635:10)
    at next (/Users/fetopcu/Desktop/Projects/alpha/shopping-queen-frontend/app/node_modules/tapable/lib/Tapable.js:138:11)

it is related to using '&' in mixins heavily which is weird as it is a crucial part of Sass.

@fokusferit fokusferit added the bug label Jul 18, 2017
@pwoosam
Copy link

pwoosam commented Dec 14, 2017

I'm currently getting this same error with bootstrap, has anyone managed to get node-sass/libsass working with compound "&" selectors?

@fokusferit
Copy link
Contributor Author

fokusferit commented Dec 15, 2017

@pwoosam well, as we are also relying on libsass, we are also waiting for a bug fix from their side or need to investigate / change our way of using compound selector. So no support from our side ^^

@fabric-design fabric-design locked as too heated and limited conversation to collaborators Dec 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants