swico 2.6.0-beta.2 → 2.6.0-beta.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.
package/package.json
CHANGED
|
@@ -36,6 +36,11 @@ function default_1(_a) {
|
|
|
36
36
|
};
|
|
37
37
|
const publicPath = (_b = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.publicPath) !== null && _b !== void 0 ? _b : main_config_1.initConfig.publicPath;
|
|
38
38
|
const routerBase = (_d = (_c = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.router) === null || _c === void 0 ? void 0 : _c.base) !== null && _d !== void 0 ? _d : main_config_1.initConfig.router.base;
|
|
39
|
+
const initialDefineVarsConfig = {
|
|
40
|
+
SWICO_ENV: JSON.stringify(env),
|
|
41
|
+
SWICO_ROUTER_BASE: JSON.stringify(routerBase),
|
|
42
|
+
SWICO_PUBLIC_PATH: JSON.stringify(publicPath)
|
|
43
|
+
};
|
|
39
44
|
const customDefineVarsConfig = yield (0, main_config_1.getFormatDefineVars)((_e = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.define) !== null && _e !== void 0 ? _e : {});
|
|
40
45
|
return {
|
|
41
46
|
entry: entryPath,
|
|
@@ -149,14 +154,10 @@ function default_1(_a) {
|
|
|
149
154
|
template: path_1.default.join(projectPath, '/src/index.ejs'),
|
|
150
155
|
filename: 'index.html',
|
|
151
156
|
minify: true,
|
|
152
|
-
templateParameters:
|
|
153
|
-
SWICO_ENV: env,
|
|
154
|
-
SWICO_ROUTER_BASE: routerBase,
|
|
155
|
-
SWICO_PUBLIC_PATH: publicPath
|
|
156
|
-
},
|
|
157
|
+
templateParameters: initialDefineVarsConfig,
|
|
157
158
|
hash: true
|
|
158
159
|
}),
|
|
159
|
-
new core_1.rspack.DefinePlugin(Object.assign({
|
|
160
|
+
new core_1.rspack.DefinePlugin(Object.assign(Object.assign({}, initialDefineVarsConfig), customDefineVarsConfig)),
|
|
160
161
|
...((_f = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) !== null && _f !== void 0 ? _f : main_config_1.initConfig.plugins)
|
|
161
162
|
]
|
|
162
163
|
};
|
|
@@ -39,6 +39,11 @@ function default_1(_a) {
|
|
|
39
39
|
};
|
|
40
40
|
const publicPath = (_b = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.publicPath) !== null && _b !== void 0 ? _b : main_config_1.initConfig.publicPath;
|
|
41
41
|
const routerBase = (_d = (_c = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.router) === null || _c === void 0 ? void 0 : _c.base) !== null && _d !== void 0 ? _d : main_config_1.initConfig.router.base;
|
|
42
|
+
const initialDefineVarsConfig = {
|
|
43
|
+
SWICO_ENV: JSON.stringify(env),
|
|
44
|
+
SWICO_ROUTER_BASE: JSON.stringify(routerBase),
|
|
45
|
+
SWICO_PUBLIC_PATH: JSON.stringify(publicPath)
|
|
46
|
+
};
|
|
42
47
|
const customDefineVarsConfig = yield (0, main_config_1.getFormatDefineVars)((_e = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.define) !== null && _e !== void 0 ? _e : {});
|
|
43
48
|
return {
|
|
44
49
|
entry: entryPath,
|
|
@@ -258,16 +263,12 @@ function default_1(_a) {
|
|
|
258
263
|
ignoreOrder: true
|
|
259
264
|
}),
|
|
260
265
|
new vue_loader_1.VueLoaderPlugin(),
|
|
261
|
-
new core_1.DefinePlugin(Object.assign({ __VUE_OPTIONS_API__: true, __VUE_PROD_DEVTOOLS__: false, __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
|
266
|
+
new core_1.DefinePlugin(Object.assign(Object.assign({ __VUE_OPTIONS_API__: true, __VUE_PROD_DEVTOOLS__: false, __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false }, initialDefineVarsConfig), customDefineVarsConfig)),
|
|
262
267
|
new html_webpack_plugin_1.default({
|
|
263
268
|
template: path_1.default.join(projectPath, '/src/index.ejs'),
|
|
264
269
|
filename: 'index.html',
|
|
265
270
|
minify: true,
|
|
266
|
-
templateParameters:
|
|
267
|
-
SWICO_ENV: env,
|
|
268
|
-
SWICO_ROUTER_BASE: routerBase,
|
|
269
|
-
SWICO_PUBLIC_PATH: publicPath
|
|
270
|
-
},
|
|
271
|
+
templateParameters: initialDefineVarsConfig,
|
|
271
272
|
hash: true
|
|
272
273
|
}),
|
|
273
274
|
...((_f = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) !== null && _f !== void 0 ? _f : main_config_1.initConfig.plugins)
|