ko 6.2.0 → 6.3.0

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.
@@ -19,7 +19,7 @@ class Build extends factory_1.ActionFactory {
19
19
  minimizer: this.service.config.experiment?.minimizer
20
20
  ? [
21
21
  new esbuild_loader_1.ESBuildMinifyPlugin({
22
- target: 'es2020',
22
+ target: 'es2015',
23
23
  css: true,
24
24
  }),
25
25
  ]
@@ -51,6 +51,7 @@ class Config {
51
51
  enableCssModule: true,
52
52
  disableLazyImports: false,
53
53
  },
54
+ autoPolyfills: false,
54
55
  };
55
56
  }
56
57
  }
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const path_1 = require("path");
7
7
  const fs_1 = require("fs");
8
+ const dynamic_resolve_webpack_plugin_1 = __importDefault(require("dynamic-resolve-webpack-plugin"));
8
9
  const lodash_1 = require("lodash");
9
10
  const loaders_1 = __importDefault(require("./loaders"));
10
11
  const plugins_1 = __importDefault(require("./plugins"));
@@ -77,6 +78,12 @@ class WebpackConfig {
77
78
  ...this.opts,
78
79
  }),
79
80
  resolve: {
81
+ plugins: [
82
+ this.opts.dynamicResolve &&
83
+ new dynamic_resolve_webpack_plugin_1.default({
84
+ dynamic: this.opts.dynamicResolve,
85
+ }),
86
+ ].filter(Boolean),
80
87
  extensions: this.extensions,
81
88
  alias,
82
89
  fallback: {
@@ -47,7 +47,7 @@ class Script {
47
47
  loader: this.ESBUILD_LOADER,
48
48
  options: {
49
49
  loader: 'tsx',
50
- target: 'es2020',
50
+ target: 'es2015',
51
51
  },
52
52
  }
53
53
  : this.BABEL_LOADER.config,
@@ -12,8 +12,9 @@ const clean_webpack_plugin_1 = require("clean-webpack-plugin");
12
12
  const copy_webpack_plugin_1 = __importDefault(require("copy-webpack-plugin"));
13
13
  const html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
14
14
  const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer");
15
+ const auto_polyfills_webpack_plugin_1 = __importDefault(require("auto-polyfills-webpack-plugin"));
15
16
  function getPlugins(opts) {
16
- const { isProd, htmlTemplate, copy, analyzer } = opts;
17
+ const { isProd, htmlTemplate, copy, analyzer, autoPolyfills } = opts;
17
18
  return [
18
19
  new webpack_1.IgnorePlugin({
19
20
  resourceRegExp: /^\.\/locale$/,
@@ -77,6 +78,11 @@ function getPlugins(opts) {
77
78
  overlay: false,
78
79
  }),
79
80
  analyzer && new webpack_bundle_analyzer_1.BundleAnalyzerPlugin(),
81
+ isProd &&
82
+ autoPolyfills &&
83
+ (typeof autoPolyfills === 'boolean'
84
+ ? new auto_polyfills_webpack_plugin_1.default()
85
+ : new auto_polyfills_webpack_plugin_1.default(autoPolyfills)),
80
86
  ].filter(Boolean);
81
87
  }
82
88
  exports.default = getPlugins;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ko",
3
- "version": "6.2.0",
3
+ "version": "6.3.0",
4
4
  "description": "build & lint library",
5
5
  "keywords": [
6
6
  "ko",
@@ -37,6 +37,7 @@
37
37
  "@babel/core": "^7.18.0",
38
38
  "@parcel/css": "^1.12.2",
39
39
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
40
+ "auto-polyfills-webpack-plugin": "^1.0.1",
40
41
  "autoprefixer": "^10.4.7",
41
42
  "babel-loader": "^8.2.5",
42
43
  "babel-plugin-treasure": "^0.9.0",
@@ -50,6 +51,7 @@
50
51
  "crypto-browserify": "^3.12.0",
51
52
  "css-loader": "^6.7.1",
52
53
  "css-minimizer-webpack-plugin": "^4.0.0",
54
+ "dynamic-resolve-webpack-plugin": "^2.0.0",
53
55
  "esbuild-loader": "^2.19.0",
54
56
  "html-webpack-plugin": "^5.5.0",
55
57
  "ko-lints": "^4.0.0",