swico 2.0.0-beta.33 → 2.0.0-beta.35
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 +1 -2
- package/src/config/rspack.prod.js +10 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "swico",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.35",
|
|
4
4
|
"description": "Simple, efficient, and practical front-end framework",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"sass-embedded": "1.86.3",
|
|
55
55
|
"sass-loader": "16.0.5",
|
|
56
56
|
"style-loader": "3.3.0",
|
|
57
|
-
"terser-webpack-plugin": "5.3.14",
|
|
58
57
|
"ts-checker-rspack-plugin": "1.1.1",
|
|
59
58
|
"ts-node": "10.9.1",
|
|
60
59
|
"vue-loader": "17.4.2",
|
|
@@ -52,7 +52,6 @@ const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
|
52
52
|
const config_1 = require("../utils/config");
|
|
53
53
|
const webpack_merge_1 = require("webpack-merge");
|
|
54
54
|
const core_1 = require("@rspack/core");
|
|
55
|
-
const terser_webpack_plugin_1 = __importDefault(require("terser-webpack-plugin"));
|
|
56
55
|
const BundleAnalyzerPlugin = webpack_bundle_analyzer_1.default.BundleAnalyzerPlugin;
|
|
57
56
|
const isAnalyze = process.env.ANALYZE === 'true';
|
|
58
57
|
function default_1(options) {
|
|
@@ -65,6 +64,7 @@ function default_1(options) {
|
|
|
65
64
|
const isPublicDirExist = yield fs_extra_1.default.exists(path_1.default.join(projectPath, '/public'));
|
|
66
65
|
const copyConfig = (_d = (_c = customConfig.prod) === null || _c === void 0 ? void 0 : _c.copy) !== null && _d !== void 0 ? _d : config_1.initConfig.copy;
|
|
67
66
|
const customDevtool = (_e = customConfig.prod.devtool) !== null && _e !== void 0 ? _e : customConfig.base.devtool;
|
|
67
|
+
console.log('consoleAvailable', consoleAvailable);
|
|
68
68
|
return (0, webpack_merge_1.merge)(baseConfig, {
|
|
69
69
|
output: {
|
|
70
70
|
cssFilename: 'css/[name].[contenthash].css',
|
|
@@ -79,15 +79,16 @@ function default_1(options) {
|
|
|
79
79
|
runtimeChunk: true,
|
|
80
80
|
minimize: true,
|
|
81
81
|
minimizer: [
|
|
82
|
-
new core_1.rspack.SwcJsMinimizerRspackPlugin({
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
minify: terser_webpack_plugin_1.default.swcMinify,
|
|
87
|
-
terserOptions: {
|
|
82
|
+
new core_1.rspack.SwcJsMinimizerRspackPlugin({
|
|
83
|
+
minimizerOptions: {
|
|
84
|
+
minify: true,
|
|
85
|
+
mangle: true,
|
|
88
86
|
compress: {
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
passes: 2,
|
|
88
|
+
drop_console: !consoleAvailable
|
|
89
|
+
},
|
|
90
|
+
format: {
|
|
91
|
+
comments: false
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
})
|