@esportsplus/ui 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,9 +2,12 @@
2
2
  "author": "ICJR",
3
3
  "dependencies": {
4
4
  "autoprefixer": "^10.4.8",
5
+ "clean-webpack-plugin": "^4.0.0",
5
6
  "css-loader": "^6.7.1",
7
+ "css-minimizer-webpack-plugin": "^4.0.0",
6
8
  "cssnano": "^5.1.13",
7
9
  "glob": "^8.0.3",
10
+ "mini-css-extract-plugin": "^2.6.1",
8
11
  "modern-normalize": "^1.1.0",
9
12
  "path-browserify": "^1.0.1",
10
13
  "postcss-loader": "^7.0.1",
@@ -18,5 +21,5 @@
18
21
  "description": "UI",
19
22
  "name": "@esportsplus/ui",
20
23
  "private": false,
21
- "version": "0.0.3"
24
+ "version": "0.0.4"
22
25
  }
@@ -1,3 +1,7 @@
1
+ const { CleanWebpackPlugin } = require('clean-webpack-plugin');
2
+ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
3
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
+
1
5
  const autoprefixer = require('autoprefixer');
2
6
  const cssnano = require('cssnano');
3
7
  const glob = require('glob');
@@ -31,6 +35,7 @@ module.exports = ({ filename, input, output, production, theme }) => {
31
35
  {
32
36
  test: /\.(c|sc|sa)ss$/,
33
37
  use: [
38
+ MiniCssExtractPlugin.loader,
34
39
  {
35
40
  loader: 'css-loader',
36
41
  options: {
@@ -52,8 +57,25 @@ module.exports = ({ filename, input, output, production, theme }) => {
52
57
  },
53
58
  ],
54
59
  },
60
+ optimization: {
61
+ minimize: true,
62
+ minimizer: [new CssMinimizerPlugin()]
63
+ },
55
64
  output: {
56
65
  path: paths.output
57
- }
66
+ },
67
+ plugins: [
68
+ new MiniCssExtractPlugin({
69
+ filename: '[name].css',
70
+ chunkFilename: '[id].css',
71
+ }),
72
+ new CleanWebpackPlugin({
73
+ cleanAfterEveryBuildPatterns: [`${paths.output}/**/*.js`],
74
+ cleanOnceBeforeBuildPatterns: [],
75
+ dangerouslyAllowCleanPatternsOutsideProject: true,
76
+ dry: false,
77
+ verbose: false
78
+ })
79
+ ]
58
80
  };
59
81
  };