shakacode / bootstrap-loader

Load Bootstrap styles and scripts in your Webpack bundle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can't Extract css (webpack 4)

shiyiya opened this issue · comments

commented

webpack can't use extract-text-webpack-plugin

entry: ["jquery", "bootstrap-loader", "./js/index.js"],
new MiniCssExtractPlugin({
      filename: "bundle.css"
    }),
      {
        test: /\.css$/,
        use: [
          MiniCssExtractPlugin.loader,
          {
            loader: "css-loader",
            options: {
              minimize: true
            }
          },
          {
            loader: "style-loader"
          }
        ]
      }
// .bootstraprc
bootstrapVersion: 3
styleLoaders:
  - style
  - css
  - sass-loader
extractStylesOptions:
  plugin: mini-css-extract-plugin
# extractStyles: true
env:
  development:
    extractStyles: false
  production:
    extractStyles: true

image
image

commented

i was used it (mini-css-extract-plugin), but can't extract css.

@shiyiya See the examples directory. You will find examples.