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

Specifying output.filename disables auto-minify in production mode #6732

Closed
andybarron opened this issue Mar 12, 2018 · 4 comments
Closed

Specifying output.filename disables auto-minify in production mode #6732

andybarron opened this issue Mar 12, 2018 · 4 comments

Comments

@andybarron
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Specifying output.filename in webpack.config.js disables output minification in production mode. When commenting out that single line of config, it works as intended.

If the current behavior is a bug, please provide the steps to reproduce.
Specify output: { filename: 'foo.js' } } and mode: 'production' in Webpack config and run webpack CLI

What is the expected behavior?
Always minify the output bundle.

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.
Node 8.9.4, Webpack 4.1.1, macOS 10.12.6

@chengluyu
Copy link

Cannot reproduce with Node v8.9.4 and webpack 4.1.1. Could you attach an example?

@sokra
Copy link
Member

sokra commented Mar 13, 2018

I don't think this is a bug, but a user error instead.

@andybarron
Copy link
Author

andybarron commented Mar 13, 2018 via email

@sokra
Copy link
Member

sokra commented Mar 13, 2018

@sokra sokra closed this as completed Mar 13, 2018
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