Skip to content

Can't figure out how to enable disableStructuralMinification via loaders #46

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

Closed
EvHaus opened this issue Apr 15, 2015 · 2 comments
Closed

Comments

@EvHaus
Copy link

EvHaus commented Apr 15, 2015

Uglify is breaking all sorts of things with my CSS so I'm trying to enable disableStructuralMinification but I can't tell if it's working as nothing is changing. I've tried:

{test: /\.css$/, loader: 'style!css?disableStructuralMinification!'},
{test: /\.less$/, loaders: [
    "style-loader",
    "css-loader",
    "less-loader"
]}

And then I tried

{test: /\.css$/, loader: 'style!css},
{test: /\.less$/, loaders: [
    "style-loader",
    "css-loader?disableStructuralMinification!'",
    "less-loader"
]}

But it doesn't seem to resolve my issues. The minification process still moves CSS rules around in such a way that causes broken styling in my app.

What am I doing wrong?

@sokra
Copy link
Member

sokra commented Apr 15, 2015

We switched from csso to clean-css, so this is no longer available.

Use this list of options instead:

https://github.com/jakubpawlowicz/clean-css#how-to-use-clean-css-programmatically

i. e. css-loader?-restructuring,keepBreaks

@EvHaus
Copy link
Author

EvHaus commented Apr 15, 2015

Thanks. That did the trick.

I'll keep this issue open so that you can remember to update the docs.

sokra added a commit that referenced this issue Apr 16, 2015
@sokra sokra closed this as completed May 27, 2015
koistya pushed a commit to koistya/css-loader that referenced this issue Nov 19, 2015
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