1.1.18 • Published 8 months ago

@pieced/style-config-webpack-plugin v1.1.18

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Automatically configuration webpack5 style loader

Install

npm i --save-dev @pieced/style-config-webpack-plugin

Webpack Config

const StyleConfigWebpackPlugin = require('@pieced/style-config-webpack-plugin');
module.exports = {
  plugins: [new StyleConfigWebpackPlugin()],
};

Options

useCssModules

  • type boolean
  • default true

cssModulesQuery

  • type string
  • default modules

usePostCSS

  • type boolean
  • default true

extract

  • type boolean or object
  • default
const defaultExtract = webpack.mode === 'production' && {
  filename: 'static/css/[contenthash:10].css',
  chunkFilename: 'static/css/[contenthash:10].css',
}

sourceMap

  • type boolean
  • default webpack.mode === 'development'

cssModulesName

  • type string
  • default webpack.mode === 'development' ? '[name]__[local]--[hash:base64:5]' : '_[hash:base64:10]'

generator

  • type function
  • default (suffix, loaders) => (webpack.mode === 'development' ? ['style-loader'].concat(loaders) : loaders)

minimizer

const defaultMinimizer = {
  minimizerOptions: {
    preset: ['default', {
      discardComments: {
        removeAll: true,
      },
    }],
  },
}
1.1.1

10 months ago

1.1.0

10 months ago

1.1.9

10 months ago

1.1.8

10 months ago

1.1.7

10 months ago

1.1.6

10 months ago

1.1.5

10 months ago

1.1.4

10 months ago

1.1.3

10 months ago

1.1.2

10 months ago

1.1.15-beta.0

10 months ago

1.1.12

10 months ago

1.1.11

10 months ago

1.1.10

10 months ago

1.1.16

9 months ago

1.1.15

10 months ago

1.1.14

10 months ago

1.1.13

10 months ago

1.1.18

8 months ago

1.1.17

9 months ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago