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

Stylesheets are not minimized on production #218

Closed
aganov opened this issue Apr 1, 2017 · 1 comment
Closed

Stylesheets are not minimized on production #218

aganov opened this issue Apr 1, 2017 · 1 comment

Comments

@aganov
Copy link
Contributor

aganov commented Apr 1, 2017

Seems like stylesheet minimization is not enabled by default on production env. It was previously achieved by new webpack.LoaderOptionsPlugin({minimize: true}) in production.js but this was removed here a858f8e#diff-f83786ad580b744c4ee876b6fe21c138

I think we have 3 options to get back minimization:

  • Get back webpack.LoaderOptionsPlugin({minimize: true}) to production.js
  • Modify loaders/sass.js to something like use: [ { loader: 'css-loader', options: { minimize: env.NODE_ENV === 'production' } }, 'postcss-loader', 'sass-loader'] which seems ugly solution
  • Add --optimize-minimize or -p options to webpack in webpacker:compile task

@gauravtiwari What do you think?

@dhh
Copy link
Member

dhh commented Apr 4, 2017

Fixed by #225.

@dhh dhh closed this as completed Apr 4, 2017
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