swico 2.6.0-beta.1 → 2.6.0-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "2.6.0-beta.1",
3
+ "version": "2.6.0-beta.2",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -39,6 +39,7 @@
39
39
  "eslint-rspack-plugin": "4.2.1",
40
40
  "fs-extra": "11.3.0",
41
41
  "html-loader": "5.1.0",
42
+ "html-webpack-plugin": "5.6.4",
42
43
  "less": "4.3.0",
43
44
  "less-loader": "12.2.0",
44
45
  "ora": "5.4.1",
@@ -16,6 +16,7 @@ exports.default = default_1;
16
16
  const path_1 = __importDefault(require("path"));
17
17
  const main_config_1 = require("../main-config");
18
18
  const core_1 = require("@rspack/core");
19
+ const html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
19
20
  const lessLoader = require.resolve('less-loader');
20
21
  const sassLoader = require.resolve('sass-loader');
21
22
  const postcssLoader = require.resolve('postcss-loader');
@@ -35,6 +36,7 @@ function default_1(_a) {
35
36
  };
36
37
  const publicPath = (_b = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.publicPath) !== null && _b !== void 0 ? _b : main_config_1.initConfig.publicPath;
37
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 customDefineVarsConfig = yield (0, main_config_1.getFormatDefineVars)((_e = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.define) !== null && _e !== void 0 ? _e : {});
38
40
  return {
39
41
  entry: entryPath,
40
42
  output: {
@@ -143,7 +145,7 @@ function default_1(_a) {
143
145
  },
144
146
  externals: customConfig.base.externals,
145
147
  plugins: [
146
- new core_1.rspack.HtmlRspackPlugin({
148
+ new html_webpack_plugin_1.default({
147
149
  template: path_1.default.join(projectPath, '/src/index.ejs'),
148
150
  filename: 'index.html',
149
151
  minify: true,
@@ -154,7 +156,7 @@ function default_1(_a) {
154
156
  },
155
157
  hash: true
156
158
  }),
157
- new core_1.rspack.DefinePlugin(Object.assign({ SWICO_ENV: env, SWICO_ROUTER_BASE: routerBase, SWICO_PUBLIC_PATH: publicPath }, (0, main_config_1.getFormatDefineVars)((_e = customConfig.base.define) !== null && _e !== void 0 ? _e : {}))),
159
+ new core_1.rspack.DefinePlugin(Object.assign({ SWICO_ENV: env, SWICO_ROUTER_BASE: routerBase, SWICO_PUBLIC_PATH: publicPath }, customDefineVarsConfig)),
158
160
  ...((_f = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) !== null && _f !== void 0 ? _f : main_config_1.initConfig.plugins)
159
161
  ]
160
162
  };
@@ -17,6 +17,7 @@ const path_1 = __importDefault(require("path"));
17
17
  const main_config_1 = require("../main-config");
18
18
  const vue_loader_1 = require("vue-loader");
19
19
  const core_1 = require("@rspack/core");
20
+ const html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
20
21
  const vueStyleLoader = require.resolve('vue-style-loader');
21
22
  const cssLoader = require.resolve('css-loader');
22
23
  const lessLoader = require.resolve('less-loader');
@@ -38,6 +39,7 @@ function default_1(_a) {
38
39
  };
39
40
  const publicPath = (_b = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.publicPath) !== null && _b !== void 0 ? _b : main_config_1.initConfig.publicPath;
40
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 customDefineVarsConfig = yield (0, main_config_1.getFormatDefineVars)((_e = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.define) !== null && _e !== void 0 ? _e : {});
41
43
  return {
42
44
  entry: entryPath,
43
45
  output: {
@@ -256,8 +258,8 @@ function default_1(_a) {
256
258
  ignoreOrder: true
257
259
  }),
258
260
  new vue_loader_1.VueLoaderPlugin(),
259
- new core_1.DefinePlugin(Object.assign({ __VUE_OPTIONS_API__: true, __VUE_PROD_DEVTOOLS__: false, __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false, SWICO_ENV: env, SWICO_ROUTER_BASE: routerBase, SWICO_PUBLIC_PATH: publicPath }, (0, main_config_1.getFormatDefineVars)((_e = customConfig.base.define) !== null && _e !== void 0 ? _e : {}))),
260
- new core_1.HtmlRspackPlugin({
261
+ new core_1.DefinePlugin(Object.assign({ __VUE_OPTIONS_API__: true, __VUE_PROD_DEVTOOLS__: false, __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false, SWICO_ENV: env, SWICO_ROUTER_BASE: routerBase, SWICO_PUBLIC_PATH: publicPath }, customDefineVarsConfig)),
262
+ new html_webpack_plugin_1.default({
261
263
  template: path_1.default.join(projectPath, '/src/index.ejs'),
262
264
  filename: 'index.html',
263
265
  minify: true,