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

CleanCSS and source maps #87

Open
glen-84 opened this issue Nov 23, 2018 · 0 comments
Open

CleanCSS and source maps #87

glen-84 opened this issue Nov 23, 2018 · 0 comments

Comments

@glen-84
Copy link

glen-84 commented Nov 23, 2018

It's now possible to use CleanCSS:

const CleanCss = require("clean-css");

new OptimizeCssAssetsPlugin({
    cssProcessor: CleanCss,
    cssProcessorOptions: {
        sourceMap: true
    }
})

... but source maps do not work.

CleanCSS.process is not returning the source map (map), and it's also not appending the sourceMappingURL comment to the processed CSS.

It seems like it also needs to pass the current/previous map when calling minify (see this comment for an example).

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

1 participant