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

Setting 'compress' option to 'false' still results in minified output #257

Closed
hal-gh opened this issue Sep 5, 2014 · 5 comments
Closed

Comments

@hal-gh
Copy link

hal-gh commented Sep 5, 2014

My issue is exactly the same as #65. I believe it was closed with a workaround rather than a fix, and hence there is no way to prevent mangle/compression.

My ultimate goal is to strip all comments from bundle.min.js using this config:

removeComments: {
  options: {
    compress: false,
    mangle: false,
    preserveComments: false
  },
  src: [
    './path/to/bundle.min.js'
  ],
  dest: './path/to/bundle.min.js'
}
@UltCombo
Copy link
Contributor

UltCombo commented Sep 6, 2014

From #65:

Using uglifyjs directly has the same result; so I'm assuming that it always produces minified output, even when doing no compression. That's a shame.

You should probably report it in the UglifyJS2 repository.

@hal-gh
Copy link
Author

hal-gh commented Sep 6, 2014

OK, will do.
Still, the documentation has not reflected the actual behaviour of this aspect of UglifyJS2 for over a year now. It would be good to correct it.

@FrankFan
Copy link

FrankFan commented Jun 2, 2015

// 是否压缩代码
output: {
    beautify: false
}

@MichaelJCole
Copy link

See this issue in UglifyJS

@MichaelJCole
Copy link

Hey, what was the result of this? Uglify is breaking my AngularJS code.

'Error: [$compile:nonassign] Expression '' used with directive 'graphTree' is non-assignable!'

I'd like to turn if off, but it's built into the Angular-Fullstack toolchain, so I can't just remove the grunt task and have it work.

How do I turn off mangling?

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

5 participants