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

sourceMappingURL comment is removed in minification #98

Closed
iambalaam opened this issue Feb 28, 2019 · 2 comments
Closed

sourceMappingURL comment is removed in minification #98

iambalaam opened this issue Feb 28, 2019 · 2 comments

Comments

@iambalaam
Copy link

I'm struggling to minify my css, and keep the sourceMappingURL comment to my .css.map file.

On the minification branch of this minimal repo I have added a minimizer

new OptimizeCSSAssetsPlugin({
    cssProcessorOptions: {
        map: { inline: false }
    }
})

Before adding this minimizer

I get unminified .css and a .css.map file but a correct map back to the .scss file.

After adding this minimizer

I get minified .css and a .css.map file, but the sourceMappingURL comment has been removed

@anlambert
Copy link

I encountered the same issue today. You can find the fix here: #81 (comment)

@iambalaam
Copy link
Author

This 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

2 participants