shakacode / bootstrap-sass-loader

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

how do i include bootswatch customizations for _variables and _bootswatch? #34

Closed mikedevita closed 9 years ago

mikedevita commented 9 years ago

i am using a config like so..

var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
  preBootstrapCustomizations: './src/scss/_variables.scss',
  bootstrapCustomizations: './src/scss/_bootswatch.scss',
  mainSass: './src/scss/index.scss',
  verbose: false,
  debug: false,
...

however when i run webpack i get an error...

ERROR in ./~/extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!./~/style-loader!./~/css-loader!./~/sass-loader?outputStyle=expanded!./~/bootstrap-sass-loader/bootstrap-sass-styles.loader.js!./bootstrap-sass.config.js
Module build failed: ModuleBuildError: Module build failed:
    @include box-shadow(none);
            ^
      No mixin named box-shadow
justin808 commented 9 years ago

@mikedevita Do you only have the trouble with using the extract-text loader?

Can you try out the advice here: https://github.com/shakacode/bootstrap-sass-loader#testing-changes-in-the-bootstrap-sass-loader

And compare your setup to: https://github.com/shakacode/react-webpack-rails-tutorial/

justin808 commented 9 years ago

Here's where the mixin is defined: https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss#L65

mikedevita commented 9 years ago

If i remove extract text i get the same result.. you can see the codebase here..

My setup is similar to that react rails repo. mikedevita/react-auth-boilerplate

edit if i remove the @include box-shadow(none); from _bootswatch.scss everything works fine.

justin808 commented 9 years ago

Try turning on verbose and debug:

https://github.com/mikedevita/react-auth-boilerplate/blob/master/bootstrap-sass.config.js#L6

justin808 commented 9 years ago

Please open the issue again if you need more help, @mikedevita.