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

It's totally not obvious how to make source maps work #81

Open
x-yuri opened this issue Sep 17, 2018 · 2 comments
Open

It's totally not obvious how to make source maps work #81

x-yuri opened this issue Sep 17, 2018 · 2 comments

Comments

@x-yuri
Copy link

x-yuri commented Sep 17, 2018

Wrong:

new OptimizeCssAssetsPlugin({cssProcessorOptions: {map: true}})

Correct:

new OptimizeCssAssetsPlugin({cssProcessorOptions: {map: {inline: false, annotations: true}}})

Since with optimize-css-assets-webpack-plugin map is supposed to be an object. More info here.

At least this much is worth mentioning in the README,

@anlambert
Copy link

Thanks for sharing this! I was struggling on the same problem since a couple of hours.
Nevertheless, there is a typo in the annotations parameter provided to PostCSS (see https://github.com/postcss/postcss/blob/master/docs/source-maps.md)
The correct solution is:

new OptimizeCssAssetsPlugin({cssProcessorOptions: {map: {inline: false, annotation: true}}})

@iambalaam
Copy link

Everything now works correctly! Thank you

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

No branches or pull requests

3 participants