@codelet/cli-service 0.0.1 → 0.0.3

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.
Files changed (2) hide show
  1. package/dist/config.js +8 -1
  2. package/package.json +6 -5
package/dist/config.js CHANGED
@@ -8,6 +8,7 @@ const webpackbar_1 = __importDefault(require("webpackbar"));
8
8
  const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
9
9
  const inject_chunk_webpack_plugin_1 = __importDefault(require("@codelet/inject-chunk-webpack-plugin"));
10
10
  const app_json_webpack_plugin_1 = __importDefault(require("@codelet/app-json-webpack-plugin"));
11
+ const terser_webpack_plugin_1 = __importDefault(require("terser-webpack-plugin"));
11
12
  const utils_1 = require("./utils");
12
13
  function getDefaultConfig() {
13
14
  const entryPath = './src';
@@ -41,7 +42,7 @@ function getDefaultConfig() {
41
42
  use: [mini_css_extract_plugin_1.default.loader, 'css-loader', 'sass-loader'],
42
43
  },
43
44
  {
44
- test: /\.wxml$/,
45
+ test: /\.(wxml|html)$/,
45
46
  loader: '@codelet/wxml-loader',
46
47
  options: {
47
48
  entryPath,
@@ -90,6 +91,12 @@ function getDefaultConfig() {
90
91
  new webpackbar_1.default(),
91
92
  ],
92
93
  optimization: {
94
+ minimize: true,
95
+ minimizer: [
96
+ new terser_webpack_plugin_1.default({
97
+ extractComments: false, // 不生成 license 文件
98
+ }),
99
+ ],
93
100
  splitChunks: {
94
101
  chunks: 'all',
95
102
  minChunks: 2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codelet/cli-service",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "cli-service",
5
5
  "bin": {
6
6
  "codelet-cli-service": "./bin/codelet-cli-service.js"
@@ -35,13 +35,14 @@
35
35
  "mini-css-extract-plugin": "^2.7.7",
36
36
  "sass": "^1.69.7",
37
37
  "sass-loader": "^13.3.3",
38
+ "terser-webpack-plugin": "^5.3.10",
38
39
  "webpack": "^5.89.0",
39
40
  "webpack-merge": "^5.10.0",
40
41
  "webpackbar": "^6.0.0",
41
- "@codelet/app-json-webpack-plugin": "^0.0.1",
42
- "@codelet/inject-chunk-webpack-plugin": "^0.0.1",
43
- "@codelet/wxml-loader": "^0.0.1",
44
- "@codelet/copy-loader": "^0.0.1"
42
+ "@codelet/inject-chunk-webpack-plugin": "^0.0.3",
43
+ "@codelet/app-json-webpack-plugin": "^0.0.3",
44
+ "@codelet/wxml-loader": "^0.0.3",
45
+ "@codelet/copy-loader": "^0.0.3"
45
46
  },
46
47
  "devDependencies": {
47
48
  "rimraf": "^5.0.5"