shakacode / bootstrap-sass-loader

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

Loading only bootstrap styles #37

Closed jsdmc closed 9 years ago

jsdmc commented 9 years ago

Aloha! Can anybody gime me a tip how to configure webpack to expose only bootstrap.css, because I don't use bootstrap scrips at all? Can't find solution yet

Shaaaka)

justin808 commented 9 years ago

just place it as an entry point for the webpack-dev-server

or just include it on your HTML page.

jsdmc commented 9 years ago

I need compiled version. I see how to include it to webpack. But I don't want to mix bootstrap styles with others that also loaded using style-loader. But when I move bootstrap-saas-loader to separate entry point I also get styles file along with scripts (almost empty file with some webpack definitions). In configuration of loader I disabled all bootstrap scripts. That's what I'm talking about. How to get bundle of bootstrap styles without bundle for bootstrap scripts. Cheers

justin808 commented 9 years ago

@jsdmc Try setting all the bootstrap scripts to false:

https://github.com/shakacode/bootstrap-sass-loader/blob/master/bootstrap-sass.config.js#L34

  scripts: {
    'transition': true,
    'alert': true,
    'button': true,
    'carousel': true,
    'collapse': true,
    'dropdown': true,
    'modal': true,
    'tooltip': true,
    'popover': true,
    'scrollspy': true,
    'tab': true,
    'affix': true
  },
jsdmc commented 9 years ago

@justin808 I tried of course) As I wrote above in this case you get "almost empty file with some webpack definitions"

justin808 commented 9 years ago

@jsdmc This loader is pretty easy to debug. If you can point me to a reproduction case and more details on the problem you see, I'm sure WE can fix it.

justin808 commented 9 years ago

@jsdmc See https://github.com/shakacode/bootstrap-sass-loader#testing-changes-in-the-bootstrap-sass-loader