shakacode / bootstrap-sass-loader

Webpack Loader for the Sass version Twitter Bootstrap
MIT License
118 stars 25 forks source link

Add global wrapper for CSS Modules #36

Closed justin808 closed 8 years ago

justin808 commented 9 years ago

@alexfedoseev to comment more -- some rough notes.

We need to wrap the output of the imports like:

Since Webpack's CSS loader knows about :global so whether or not we use this with Wepback's Javascript CSS or extract-text-plugin on the CSS, this should work fine.

So we don't need an option. (wow!)

:global {
  @import "<file1>";
  @import "<file2>";
}

where these are the current files.

  @import "<file1>";
  @import "<file2>";

We'll want to update the example https://github.com/shakacode/bootstrap-sass-loader-example

justin808 commented 8 years ago

This happening in: https://github.com/shakacode/bootstrap-loader/tree/alex/bootstrap-4