shakacode / bootstrap-sass-loader

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

extract text plugin #35

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hey, so I noticed that within your examples using extract text plugin, you had to require the extract plugin both in your loader config and webpack config. I believe this makes it so that the css is actually output in both the js and css bundle, unless I did it improperly? Is there some way that I can use the same instance of extract text plugin so as to avoid the duplication?

justin808 commented 9 years ago

@huoy I don't use the extract text plugin, and you're probably right.

This is how I'm using it: https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/client/bootstrap-sass.config.js

Pull requests would be great to code or docs.

ghost commented 9 years ago

Sadly I have little experience with loaders. Plugins tend to be better for this kind of thing imo, as state is more easily passed around. Was hoping there might just be a workaround to pass the extract object through the loader to the config. When I get some time I'll take a look and see if I can find a way.

justin808 commented 9 years ago

Please re-open the issue when you have more details.