create-packer 1.24.19 → 1.24.20

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-packer",
3
- "version": "1.24.19",
3
+ "version": "1.24.20",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/kevily/create-packer",
6
6
  "author": "1k <bug_zero@163.com>",
@@ -24,14 +24,17 @@ export default function (env) {
24
24
  index: [path.join(ROOT, 'main.tsx')]
25
25
  },
26
26
  output: {
27
- filename: STATIC_DIR + (env.production ? '/[name].[chunkhash].js' : '/[name].js'),
27
+ filename: STATIC_DIR + (env.WEBPACK_BUILD ? '/[name].[chunkhash].js' : '/[name].js'),
28
28
  path: OUTPUT,
29
29
  publicPath,
30
30
  clean: true
31
31
  },
32
32
  bail: true,
33
- mode: env.production ? 'production' : 'development',
34
- stats: env.production ? 'normal' : 'errors-only',
33
+ mode: env.WEBPACK_BUILD ? 'production' : 'development',
34
+ stats: env.WEBPACK_BUILD ? 'normal' : 'errors-only',
35
+ performance: {
36
+ hints: false
37
+ },
35
38
  devServer: {
36
39
  host: '0.0.0.0',
37
40
  hot: true,
@@ -77,7 +80,7 @@ export default function (env) {
77
80
  {
78
81
  test: /\.css$/,
79
82
  use: [
80
- env.prod ? MiniCssExtractPlugin.loader : 'style-loader',
83
+ env.WEBPACK_BUILD ? MiniCssExtractPlugin.loader : 'style-loader',
81
84
  'css-loader',
82
85
  'postcss-loader'
83
86
  ]
@@ -92,7 +95,7 @@ export default function (env) {
92
95
  }),
93
96
  new webpack.DefinePlugin(envConfig),
94
97
  new MiniCssExtractPlugin({
95
- filename: env.prod ? '[name].[contenthash].css' : '[name].css'
98
+ filename: env.WEBPACK_BUILD ? '[name].[contenthash].css' : '[name].css'
96
99
  })
97
100
  ],
98
101
  optimization: {