{"id":19384,"library":"bootstrap-loader","title":"bootstrap-loader","description":"Webpack loader to bundle Bootstrap 3 & 4 styles (Sass) and scripts. Version 4.0.5, last updated 2018; low maintenance. Supports Bootstrap 4 with customizations via .bootstraprc. Differentiators: inline SVG/PNG glyphicons, Tether integration, PostCSS config. Full peer dependencies required: css-loader, sass-loader, mini-css-extract-plugin, webpack >=5.0.","status":"maintenance","version":"4.0.5","language":"javascript","source_language":"en","source_url":"https://github.com/shakacode/bootstrap-loader","tags":["javascript","bootstrap","twitter"],"install":[{"cmd":"npm install bootstrap-loader","lang":"bash","label":"npm"},{"cmd":"yarn add bootstrap-loader","lang":"bash","label":"yarn"},{"cmd":"pnpm add bootstrap-loader","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"required for CSS processing","package":"css-loader","optional":false},{"reason":"extract CSS in production builds","package":"mini-css-extract-plugin","optional":false},{"reason":"compile Sass files","package":"sass-loader","optional":false},{"reason":"core bundler","package":"webpack","optional":false}],"imports":[{"note":"Side-effect only loader, no exports. Use import or require for side effects.","wrong":"const bootstrap = require('bootstrap-loader')","symbol":"bootstrap-loader","correct":"import 'bootstrap-loader'"},{"note":"Internal path may break; prefer the main entry.","wrong":"import { something } from 'bootstrap-loader/lib/loader'","symbol":"bootstrap-loader/lib/loader","correct":"import 'bootstrap-loader/lib/loader'"},{"note":"Stub for SSR or tests where Bootstrap is not needed.","symbol":"bootstrap-loader/no-op","correct":"import 'bootstrap-loader/no-op'"}],"quickstart":{"code":"// webpack.config.js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /bootstrap-loader[\\\\\\/]lib[\\\\\\/]bootstrap-sass$/,\n        use: [\n          { loader: 'style-loader' },\n          { loader: 'css-loader' },\n          { loader: 'sass-loader' }\n        ]\n      },\n      {\n        test: /\\.scss$/,\n        exclude: /bootstrap-loader[\\\\\\/]lib[\\\\\\/]bootstrap-sass$/,\n        use: [\n          { loader: 'style-loader' },\n          { loader: 'css-loader' },\n          { loader: 'sass-loader' }\n        ]\n      }\n    ]\n  },\n  plugins: [\n    new HtmlWebpackPlugin({\n      template: 'src/index.html'\n    })\n  ]\n};\n\n// src/index.js\nimport 'bootstrap-loader';\nimport './styles/main.scss';","lang":"javascript","description":"Minimal webpack config to load Bootstrap via bootstrap-loader and separate custom SCSS."},"warnings":[{"fix":"Add ProvidePlugin for jQuery and Popper.js, or use Bootstrap 4 JS via another method.","message":"Bootstrap 4 requires Bootstrap 4's JavaScript dependencies (jQuery, Popper.js) to be separately loaded. bootstrap-loader does not bundle jQuery.","severity":"breaking","affected_versions":"=4.x"},{"fix":"Upgrade webpack to >=5.0.0, or pin bootstrap-loader@3.x for webpack v4.","message":"Webpack versions: v4 requires webpack >=5.0. Older versions (v1–v3) used different loaders/config.","severity":"breaking","affected_versions":"=4.x"},{"fix":"Use webpack >=5 or downgrade to bootstrap-loader@3.x with proper extract-text-webpack-plugin version.","message":"mini-css-extract-plugin peer dependency requires webpack 5; for webpack 4 use extract-text-webpack-plugin with bootstrap-loader v3.","severity":"breaking","affected_versions":"=4.x"},{"fix":"Consider migrating to direct Bootstrap imports or a modern alternative like bootstrap (official npm package) with webpack.","message":"bootstrap-loader v4 is no longer actively maintained. Upstream Bootstrap itself moved to Bootstrap 5 with separate JS modules.","severity":"deprecated","affected_versions":">=4.0"},{"fix":"Add file-loader or url-loader for fonts/images, and set proper paths in .bootstraprc.","message":"If using Bootstrap 4 glyphicons, bootstrap-loader expects to resolve SVG/PNG files; missing loaders cause 'Module not found' errors.","severity":"gotcha","affected_versions":">=3.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install bootstrap-loader --save-dev and ensure it's listed in webpack entry or imported.","cause":"Missing dependency on bootstrap-loader or incorrect webpack config.","error":"Module not found: Error: Can't resolve 'bootstrap-loader'"},{"fix":"npm install mini-css-extract-plugin --save-dev (for webpack 5).","cause":"Required peer dependency not installed.","error":"Cannot find module 'mini-css-extract-plugin'"},{"fix":"Set $icon-font-path in your .bootstraprc pre-customizations or import Bootstrap variables before glyphicons.","cause":"Bootstrap's glyphicon paths not configured.","error":"SassError: Undefined variable: \"$icon-font-path\""}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}