File tree 1 file changed +43
-0
lines changed 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -374,6 +374,49 @@ module: {
374
374
},
375
375
` ` `
376
376
377
+ # # FAQ
378
+
379
+ # ## Using Bootstrap mixins and variables in your own code
380
+
381
+ You should use `sass-resources-loader` in your `webpack` config.
382
+
383
+ In your `webpack.config.js` :
384
+ ` ` ` javascript
385
+ module.exports = {
386
+
387
+ // stuff removed for clarity ...
388
+
389
+ module: {
390
+ loaders: [
391
+ // stuff removed for clarity ...
392
+ {
393
+ test: /\. scss$/,
394
+ loader: ExtractTextPlugin.extract(
395
+ 'style',
396
+ 'css?modules&importLoaders=2&localIdentName=[name]__[local]__[hash:base64:5]' +
397
+ '!sass' +
398
+ '!sass-resources'
399
+ ),
400
+ },
401
+ // stuff removed for clarity ...
402
+ ],
403
+ },
404
+
405
+ // stuff removed for clarity ...
406
+
407
+ sassResources: './config/sass-resources.scss',
408
+ }
409
+ ` ` `
410
+
411
+ And in your `./config/sass-resources.scss` :
412
+ ` ` `
413
+ // Make variables and mixins available when using CSS modules.
414
+ @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_variables";
415
+ @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_mixins";
416
+ ` ` `
417
+
418
+ You can then use mixins and variables from Bootstrap in your own code.
419
+
377
420
# # Contributing
378
421
See [Contributing](CONTRIBUTING.md) to get started.
379
422
You can’t perform that action at this time.
0 commit comments