@codelet/cli-service 0.0.1 → 0.0.2
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/dist/config.js +8 -1
- package/package.json +5 -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.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "cli-service",
|
|
5
5
|
"bin": {
|
|
6
6
|
"codelet-cli-service": "./bin/codelet-cli-service.js"
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"webpack": "^5.89.0",
|
|
39
39
|
"webpack-merge": "^5.10.0",
|
|
40
40
|
"webpackbar": "^6.0.0",
|
|
41
|
-
"@codelet/
|
|
42
|
-
"@codelet/
|
|
43
|
-
"@codelet/wxml-loader": "^0.0.
|
|
44
|
-
"@codelet/copy-loader": "^0.0.
|
|
41
|
+
"@codelet/inject-chunk-webpack-plugin": "^0.0.2",
|
|
42
|
+
"@codelet/app-json-webpack-plugin": "^0.0.2",
|
|
43
|
+
"@codelet/wxml-loader": "^0.0.2",
|
|
44
|
+
"@codelet/copy-loader": "^0.0.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"rimraf": "^5.0.5"
|