bootstrap-loader icon indicating copy to clipboard operation
bootstrap-loader copied to clipboard

Bootstrap's extractStyles somehow escape from webpack uglify and stored as unminified css on webpack's css bundle

Open idangozlan opened this issue 8 years ago • 6 comments

idangozlan avatar Mar 03 '17 13:03 idangozlan

@idangozlan What exactly is your question or issue?

justin808 avatar Mar 05 '17 08:03 justin808

How to minify the bootstrap CSS? When using the regular flow for production of extract + webpack uglify it's not applied on the bootstrap CSS

On Mar 5, 2017 10:44, "Justin Gordon" [email protected] wrote:

@idangozlan https://github.com/idangozlan What exactly is your question or issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shakacode/bootstrap-loader/issues/280#issuecomment-284214161, or mute the thread https://github.com/notifications/unsubscribe-auth/AB5hbe5glR-Y5IJGBwq0kSYYmOIYzTZaks5rinXngaJpZM4MSP21 .

idangozlan avatar Mar 05 '17 08:03 idangozlan

I have the same issue. I have my own CSS, and using Bootstrap CSS. I have my own ExtractTextPlugin instance which extracts CSS to a file.

This loader, once enabled, extracts to a different CSS file (which is probably fine) but how do I minify?

raybooysen avatar May 03 '17 03:05 raybooysen

I've got this working through: https://github.com/NMFR/optimize-css-assets-webpack-plugin which does a post-build optimise. The downside of this is that the source maps I get are from CSS, not from the original SASS.

However, it would be good if the loader allows you to specify some options in how the bootstrap CSS is handled so we can pass in minification options, or extract text options.

raybooysen avatar May 03 '17 03:05 raybooysen

@raybooysen Any PR, code or doc, or just changes to examples, would be awesome!

CC: @idangozlan

justin808 avatar May 08 '17 00:05 justin808

this is my .bootstraprc

"styleLoaders": [
    "style-loader",
    "css-loader?sourceMap=true&importLoaders=1&minimize=true",
    "sass-loader?sourceMap"
  ],

ufhy avatar Dec 24 '17 02:12 ufhy