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

Use devtool and sourceMap flag from webpack config #40

Closed
wants to merge 1 commit into from

Conversation

mtscout6
Copy link

Instead of needing to apply the sourceMap query parameter generate if a
devtool option is specified in the webpack config.

Instead of needing to apply the sourceMap query parameter generate if a
devtool option is specified in the webpack config.
@jhnns
Copy link
Member

jhnns commented Feb 17, 2015

Seems reasonable... @sokra why did you use a query param?

@sokra
Copy link
Member

sokra commented Feb 17, 2015

This sourceMap is different from SourceMaps in other loaders. It has a runtime overhead. (And is currently broken #29, but this is an other problem).

It injects the SourceMap to the resulting bundle (instead of generating a separate SourceMap file). You can use it without the SourceMap devtool. It is not related to the devtool at all. So I would better leave it opt-in. Currently it's only working correctly with ExtractTextPlugin with allChunks: true. In other cases it breaks when images/fonts are referenced (because of Cross-Origin-Permission error ... 😢). We need to find a whole different approach to implement it (or request browser support for @SourceMappingURL in <style>).

mtscout6 added a commit to mtscout6/extract-text-webpack-plugin that referenced this pull request Feb 25, 2015
Source-maps do not work for CSS when you base64 encode them, yet it
would be nice to to facilitate dynamically applying source-maps using
`webpack -d`. This will apply the sourceMap query param to the
css-loader if a devtool option is selected in the webpack config.

Relates to webpack-contrib/less-loader#36
Relates to webpack-contrib/css-loader#40
mtscout6 added a commit to mtscout6/extract-text-webpack-plugin that referenced this pull request Feb 25, 2015
Source-maps do not work for CSS when you base64 encode them, yet it
would be nice to to facilitate dynamically applying source-maps using
`webpack -d`. This will apply the sourceMap query param to the
css-loader if a devtool option is selected in the webpack config.

Relates to webpack-contrib/less-loader#36
Relates to webpack-contrib/css-loader#40
mtscout6 added a commit to mtscout6/extract-text-webpack-plugin that referenced this pull request Feb 25, 2015
Source-maps do not work for CSS when you base64 encode them, yet it
would be nice to to facilitate dynamically applying source-maps using
`webpack -d`. This will apply the sourceMap query param to the
css-loader if a devtool option is selected in the webpack config.

Relates to webpack-contrib/less-loader#36
Relates to webpack-contrib/css-loader#40
mtscout6 added a commit to mtscout6/extract-text-webpack-plugin that referenced this pull request Feb 25, 2015
Source-maps do not work for CSS when you base64 encode them, yet it
would be nice to to facilitate dynamically applying source-maps using
`webpack -d`. This will apply the sourceMap query param to the
css-loader if a devtool option is selected in the webpack config.

Relates to webpack-contrib/less-loader#36
Relates to webpack-contrib/css-loader#40
mtscout6 added a commit to mtscout6/extract-text-webpack-plugin that referenced this pull request Feb 25, 2015
Source-maps do not work for CSS when you base64 encode them, yet it
would be nice to to facilitate dynamically applying source-maps using
`webpack -d`. This will apply the sourceMap query param to the
css-loader if a devtool option is selected in the webpack config.

Relates to webpack-contrib/less-loader#36
Relates to webpack-contrib/css-loader#40
@mtscout6
Copy link
Author

Closing in favor of webpack-contrib/extract-text-webpack-plugin#53

@mtscout6 mtscout6 closed this Feb 25, 2015
jhnns added a commit to webpack-contrib/less-loader that referenced this pull request Mar 6, 2015
Not using the `this.sourceMap` flag because css source maps are different
@see webpack-contrib/css-loader#40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants