gant-core 0.1.44 → 0.1.46
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/lib/cli/index.js +17 -7
- package/lib/cli/index.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/package.json +1 -1
package/lib/cli/index.js
CHANGED
|
@@ -5952,6 +5952,7 @@ const defaultConfig = {
|
|
|
5952
5952
|
//登陆配置
|
|
5953
5953
|
loginConfig: {
|
|
5954
5954
|
loginPathname: "/login",
|
|
5955
|
+
loginOut: true,
|
|
5955
5956
|
},
|
|
5956
5957
|
homePath: "/dashboard",
|
|
5957
5958
|
headerMenu: true,
|
|
@@ -24382,14 +24383,24 @@ var dist = CompressionPlugin;
|
|
|
24382
24383
|
var CompressionPlugin$1 = /*@__PURE__*/getDefaultExportFromCjs(dist);
|
|
24383
24384
|
|
|
24384
24385
|
var getProConfig = (config, cwd) => {
|
|
24385
|
-
const { outputPathDir = "dist", optimization, library, compression = true } = config;
|
|
24386
|
+
const { outputPathDir = "dist", optimization, library, compression = true, terserOptions } = config;
|
|
24386
24387
|
const plugins = [];
|
|
24388
|
+
const terserPluginOptions = {
|
|
24389
|
+
exclude: /node_modules/, // 排除 node_modules 目录
|
|
24390
|
+
...terserOptions,
|
|
24391
|
+
extractComments: false,
|
|
24392
|
+
terserOptions: {
|
|
24393
|
+
compress: true,
|
|
24394
|
+
mangle: true,
|
|
24395
|
+
...terserOptions?.terserOptions
|
|
24396
|
+
},
|
|
24397
|
+
};
|
|
24387
24398
|
if (library)
|
|
24388
24399
|
return mergeConfig$1({
|
|
24389
24400
|
mode: "production",
|
|
24390
24401
|
optimization: {
|
|
24391
24402
|
minimize: true,
|
|
24392
|
-
minimizer: [new CssMinimizerPlugin(), new TerserPlugin()],
|
|
24403
|
+
minimizer: [new CssMinimizerPlugin(), new TerserPlugin(terserPluginOptions)],
|
|
24393
24404
|
...optimization,
|
|
24394
24405
|
},
|
|
24395
24406
|
plugins: [
|
|
@@ -24409,9 +24420,7 @@ var getProConfig = (config, cwd) => {
|
|
|
24409
24420
|
mode: "production",
|
|
24410
24421
|
optimization: {
|
|
24411
24422
|
minimize: true,
|
|
24412
|
-
minimizer: [new CssMinimizerPlugin(), new TerserPlugin(
|
|
24413
|
-
extractComments: false,
|
|
24414
|
-
})],
|
|
24423
|
+
minimizer: [new CssMinimizerPlugin(), new TerserPlugin(terserPluginOptions)],
|
|
24415
24424
|
runtimeChunk: 'single',
|
|
24416
24425
|
...optimization,
|
|
24417
24426
|
splitChunks: {
|
|
@@ -24538,7 +24547,8 @@ const OMIT_NAMES_ALL = [
|
|
|
24538
24547
|
'setting',
|
|
24539
24548
|
'vue',
|
|
24540
24549
|
'library',
|
|
24541
|
-
'compression'
|
|
24550
|
+
'compression',
|
|
24551
|
+
'terserOptions',
|
|
24542
24552
|
];
|
|
24543
24553
|
const hasIndex = (routes, mpa) => {
|
|
24544
24554
|
if (isEmpty$2(routes) || isEmpty$2(mpa))
|
|
@@ -66813,7 +66823,7 @@ const createCwdConfig = (cwd, name, vue) => {
|
|
|
66813
66823
|
};
|
|
66814
66824
|
|
|
66815
66825
|
var name = "gant-core";
|
|
66816
|
-
var version = "0.1.
|
|
66826
|
+
var version = "0.1.46";
|
|
66817
66827
|
var description = "";
|
|
66818
66828
|
var main = "lib/index.js";
|
|
66819
66829
|
var bin = {
|