@merkur/tool-webpack 0.31.0 โ†’ 0.33.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.
package/CHANGELOG.md CHANGED
@@ -3,112 +3,90 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [0.31.0](https://github.com/mjancarik/merkur/compare/v0.30.1...v0.31.0) (2023-04-25)
6
+ # [0.33.0](https://github.com/mjancarik/merkur/compare/v0.32.1...v0.33.0) (2023-08-10)
7
7
 
8
+ **Note:** Version bump only for package @merkur/tool-webpack
8
9
 
9
- ### Features
10
10
 
11
- * ๐ŸŽธ Add support of OpenSSL 3 in Node.js >= 17 ([a8f3385](https://github.com/mjancarik/merkur/commit/a8f33853e0eaea8482611f99bed6f02228048d05))
12
11
 
13
12
 
14
13
 
14
+ # [0.32.0](https://github.com/mjancarik/merkur/compare/v0.31.1...v0.32.0) (2023-07-14)
15
15
 
16
+ ### Features
16
17
 
17
- # [0.30.0](https://github.com/mjancarik/merkur/compare/v0.29.5...v0.30.0) (2022-11-28)
18
+ - ๐ŸŽธ remove ES5 Javascript ([cc782ad](https://github.com/mjancarik/merkur/commit/cc782adcdf8e19ddf79cba9e134dec6f96ec6893))
18
19
 
19
- **Note:** Version bump only for package @merkur/tool-webpack
20
+ ### BREAKING CHANGES
20
21
 
22
+ - ๐Ÿงจ Remove supports for old browsers(IE11, etc.). Minimal supported browsers
23
+ use ES9.
21
24
 
25
+ # [0.31.0](https://github.com/mjancarik/merkur/compare/v0.30.1...v0.31.0) (2023-04-25)
22
26
 
27
+ ### Features
23
28
 
29
+ - ๐ŸŽธ Add support of OpenSSL 3 in Node.js >= 17 ([a8f3385](https://github.com/mjancarik/merkur/commit/a8f33853e0eaea8482611f99bed6f02228048d05))
24
30
 
25
- # [0.29.0](https://github.com/mjancarik/merkur/compare/v0.28.2...v0.29.0) (2022-08-08)
31
+ # [0.30.0](https://github.com/mjancarik/merkur/compare/v0.29.5...v0.30.0) (2022-11-28)
26
32
 
27
33
  **Note:** Version bump only for package @merkur/tool-webpack
28
34
 
35
+ # [0.29.0](https://github.com/mjancarik/merkur/compare/v0.28.2...v0.29.0) (2022-08-08)
29
36
 
30
-
31
-
37
+ **Note:** Version bump only for package @merkur/tool-webpack
32
38
 
33
39
  # [0.28.0](https://github.com/mjancarik/merkur/compare/v0.27.6...v0.28.0) (2022-04-20)
34
40
 
35
-
36
41
  ### Code Refactoring
37
42
 
38
- * ๐Ÿ’ก move liveReloadServer to merkur/tools ([f81e0e8](https://github.com/mjancarik/merkur/commit/f81e0e89eff4a72985c89d23079be6a9344a3b2e))
39
-
43
+ - ๐Ÿ’ก move liveReloadServer to merkur/tools ([f81e0e8](https://github.com/mjancarik/merkur/commit/f81e0e89eff4a72985c89d23079be6a9344a3b2e))
40
44
 
41
45
  ### BREAKING CHANGES
42
46
 
43
- * ๐Ÿงจ The liveReloadServer.cjs file is moved to @merkur/tools. The
44
- @merkur/tool-webpack re-export createLiveReloadServer for keeping
45
- backward compatability.
46
-
47
-
48
-
49
-
47
+ - ๐Ÿงจ The liveReloadServer.cjs file is moved to @merkur/tools. The
48
+ @merkur/tool-webpack re-export createLiveReloadServer for keeping
49
+ backward compatability.
50
50
 
51
51
  ## [0.27.4](https://github.com/mjancarik/merkur/compare/v0.27.3...v0.27.4) (2021-10-06)
52
52
 
53
-
54
53
  ### Features
55
54
 
56
- * ๐ŸŽธ Allow CssMinimizerPlugin options override ([#114](https://github.com/mjancarik/merkur/issues/114)) ([c02dd0b](https://github.com/mjancarik/merkur/commit/c02dd0bf06a44bbf45880c9b1932a33e287f35ce))
57
-
58
-
59
-
60
-
55
+ - ๐ŸŽธ Allow CssMinimizerPlugin options override ([#114](https://github.com/mjancarik/merkur/issues/114)) ([c02dd0b](https://github.com/mjancarik/merkur/commit/c02dd0bf06a44bbf45880c9b1932a33e287f35ce))
61
56
 
62
57
  ## [0.27.3](https://github.com/mjancarik/merkur/compare/v0.27.2...v0.27.3) (2021-10-04)
63
58
 
64
-
65
59
  ### Bug Fixes
66
60
 
67
- * ๐Ÿ› Windows babel es5 build issue with exclude pattern ([#113](https://github.com/mjancarik/merkur/issues/113)) ([26387ea](https://github.com/mjancarik/merkur/commit/26387ea01d840d5d6f55d4748d34c87c7f3f5f10))
68
-
69
-
70
-
71
-
61
+ - ๐Ÿ› Windows babel es5 build issue with exclude pattern ([#113](https://github.com/mjancarik/merkur/issues/113)) ([26387ea](https://github.com/mjancarik/merkur/commit/26387ea01d840d5d6f55d4748d34c87c7f3f5f10))
72
62
 
73
63
  ## [0.27.1](https://github.com/mjancarik/merkur/compare/v0.27.0...v0.27.1) (2021-09-30)
74
64
 
75
65
  **Note:** Version bump only for package @merkur/tool-webpack
76
66
 
77
-
78
-
79
-
80
-
81
67
  # [0.27.0](https://github.com/mjancarik/merkur/compare/v0.26.1...v0.27.0) (2021-09-29)
82
68
 
83
-
84
69
  ### Features
85
70
 
86
- * ๐ŸŽธ Added default support for asset image resources ([bd94f8d](https://github.com/mjancarik/merkur/commit/bd94f8d1a536335363a0f3381f85e57448078ac3))
87
- * ๐ŸŽธ Automatically generate free port for livereload server ([#101](https://github.com/mjancarik/merkur/issues/101)) ([a083a1b](https://github.com/mjancarik/merkur/commit/a083a1b31edc818a2d94e000a78cbb03cc8dc022))
88
-
71
+ - ๐ŸŽธ Added default support for asset image resources ([bd94f8d](https://github.com/mjancarik/merkur/commit/bd94f8d1a536335363a0f3381f85e57448078ac3))
72
+ - ๐ŸŽธ Automatically generate free port for livereload server ([#101](https://github.com/mjancarik/merkur/issues/101)) ([a083a1b](https://github.com/mjancarik/merkur/commit/a083a1b31edc818a2d94e000a78cbb03cc8dc022))
89
73
 
90
74
  ### BREAKING CHANGES
91
75
 
92
- * ๐Ÿงจ createLiveReloadServer() function must be promise chained in
93
- webpack.config.js before returning any config array.
94
-
95
-
96
-
97
-
76
+ - ๐Ÿงจ createLiveReloadServer() function must be promise chained in
77
+ webpack.config.js before returning any config array.
98
78
 
99
79
  # [0.26.0](https://github.com/mjancarik/merkur/compare/v0.25.0...v0.26.0) (2021-08-27)
100
80
 
101
-
102
81
  ### Features
103
82
 
104
- * ๐ŸŽธ create new module tool-webpack ([#99](https://github.com/mjancarik/merkur/issues/99)) ([111fda7](https://github.com/mjancarik/merkur/commit/111fda7a6854528472b8539ec12fffe7a1d7efae))
105
-
83
+ - ๐ŸŽธ create new module tool-webpack ([#99](https://github.com/mjancarik/merkur/issues/99)) ([111fda7](https://github.com/mjancarik/merkur/commit/111fda7a6854528472b8539ec12fffe7a1d7efae))
106
84
 
107
85
  ### BREAKING CHANGES
108
86
 
109
- * ๐Ÿงจ Extract webpack to alone module merkur/tool-webpack from merkur/tools
110
- module
87
+ - ๐Ÿงจ Extract webpack to alone module merkur/tool-webpack from merkur/tools
88
+ module
111
89
 
112
- * ci: ๐ŸŽก add lock file for new module
90
+ - ci: ๐ŸŽก add lock file for new module
113
91
 
114
- * feat: ๐ŸŽธ add new module merkur/tool-webpack to dev dependencies
92
+ - feat: ๐ŸŽธ add new module merkur/tool-webpack to dev dependencies
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  ![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@merkur/core/latest)
12
12
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
13
13
 
14
- The [Merkur](https://merkur.js.org/) is tiny extensible javascript library for front-end microservices(micro frontends). It allows by default server side rendering for loading performance boost. You can connect it with other frameworks or languages because merkur defines easy API. You can use one of six predefined template's library [React](https://reactjs.org/), [Preact](https://preactjs.com/), [hyperHTML](https://viperhtml.js.org/hyper.html), [ยตhtml](https://github.com/WebReflection/uhtml#readme), [Svelte](https://svelte.dev/) and [vanilla](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) but you can easily extend for others.
14
+ The [Merkur](https://merkur.js.org/) is tiny extensible javascript library for front-end microservices(micro frontends). It allows by default server side rendering for loading performance boost. You can connect it with other frameworks or languages because merkur defines easy API. You can use one of six predefined template's library [Preact](https://preactjs.com/), [ยตhtml](https://github.com/WebReflection/uhtml#readme), [Svelte](https://svelte.dev/) and [vanilla](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) but you can easily extend for others.
15
15
 
16
16
  ## Features
17
17
  - Flexible templating engine
package/index.cjs CHANGED
@@ -16,7 +16,6 @@ const { applyBundleAnalyzer } = require('./module/bundleAnalyzer.cjs');
16
16
  const {
17
17
  findLoaders,
18
18
  applyES9Transformation,
19
- applyES5Transformation,
20
19
  } = require('./module/babelLoader.cjs');
21
20
  const { applyStyleLoaders } = require('./module/styleLoader.cjs');
22
21
 
@@ -253,6 +252,5 @@ module.exports = {
253
252
  createLiveReloadServer,
254
253
  applyBundleAnalyzer,
255
254
  applyES9Transformation,
256
- applyES5Transformation,
257
255
  applyStyleLoaders,
258
256
  };
@@ -32,7 +32,7 @@ function findLoaders(rules = [], loader) {
32
32
  function createESTransformation(
33
33
  config,
34
34
  { cwd, isProduction, nodeModulesDir, environment, cache },
35
- esVersion
35
+ esVersion,
36
36
  ) {
37
37
  const esPolyfillFilePath = `./src/polyfill.${esVersion}.js`;
38
38
 
@@ -50,45 +50,31 @@ function createESTransformation(
50
50
  alias: {
51
51
  '@merkur/core': path.join(
52
52
  nodeModulesDir,
53
- `@merkur/core/lib/index.${esVersion}.${
54
- esVersion === 'es5' ? 'js' : 'mjs'
55
- }`
53
+ `@merkur/core/lib/index.${esVersion}.mjs`,
56
54
  ),
57
55
  '@merkur/plugin-component': path.join(
58
56
  nodeModulesDir,
59
- `@merkur/plugin-component/lib/index.${esVersion}.${
60
- esVersion === 'es5' ? 'js' : 'mjs'
61
- }`
57
+ `@merkur/plugin-component/lib/index.mjs`,
62
58
  ),
63
59
  '@merkur/plugin-event-emitter': path.join(
64
60
  nodeModulesDir,
65
- `@merkur/plugin-event-emitter/lib/index.${esVersion}.${
66
- esVersion === 'es5' ? 'js' : 'mjs'
67
- }`
61
+ `@merkur/plugin-event-emitter/lib/index.mjs`,
68
62
  ),
69
63
  '@merkur/plugin-http-client': path.join(
70
64
  nodeModulesDir,
71
- `@merkur/plugin-http-client/lib/index.${esVersion}.${
72
- esVersion === 'es5' ? 'js' : 'mjs'
73
- }`
65
+ `@merkur/plugin-http-client/lib/index.mjs`,
74
66
  ),
75
67
  '@merkur/plugin-error': path.join(
76
68
  nodeModulesDir,
77
- `@merkur/plugin-error/lib/index.${esVersion}.${
78
- esVersion === 'es5' ? 'js' : 'mjs'
79
- }`
69
+ `@merkur/plugin-error/lib/index.mjs`,
80
70
  ),
81
71
  '@merkur/plugin-router': path.join(
82
72
  nodeModulesDir,
83
- `@merkur/plugin-router/lib/index.${esVersion}.${
84
- esVersion === 'es5' ? 'js' : 'mjs'
85
- }`
73
+ `@merkur/plugin-router/lib/index.mjs`,
86
74
  ),
87
75
  '@merkur/plugin-css-scrambler': path.join(
88
76
  nodeModulesDir,
89
- `@merkur/plugin-router/lib/index.${esVersion}.${
90
- esVersion === 'es5' ? 'js' : 'mjs'
91
- }`
77
+ `@merkur/plugin-router/lib/index.mjs`,
92
78
  ),
93
79
  ...config.resolve.alias,
94
80
  },
@@ -101,7 +87,7 @@ function createESTransformation(
101
87
 
102
88
  const { loaders: babelLoaders } = findLoaders(
103
89
  config.module.rules,
104
- 'babel-loader'
90
+ 'babel-loader',
105
91
  );
106
92
 
107
93
  const babelPresetEnv = [
@@ -133,7 +119,7 @@ function createESTransformation(
133
119
  cacheIdentifier: createCacheKey(
134
120
  environment,
135
121
  config?.name,
136
- ...(cache?.versionDependencies ?? [])
122
+ ...(cache?.versionDependencies ?? []),
137
123
  ),
138
124
  cacheDirectory: true,
139
125
  cacheCompression: false,
@@ -163,24 +149,7 @@ function applyES9Transformation(config, context) {
163
149
  return config;
164
150
  }
165
151
 
166
- function applyES5Transformation(config, context) {
167
- config = createESTransformation(config, context, 'es5');
168
- config.output.environment = {
169
- arrowFunction: false,
170
- bigIntLiteral: false,
171
- const: false,
172
- destructuring: false,
173
- dynamicImport: false,
174
- forOf: false,
175
- module: false,
176
- ...config.output?.environment,
177
- };
178
-
179
- return config;
180
- }
181
-
182
152
  module.exports = {
183
153
  findLoaders,
184
154
  applyES9Transformation,
185
- applyES5Transformation,
186
155
  };
@@ -76,7 +76,7 @@ function applyStyleLoaders(config, context) {
76
76
  exclude: /node_modules/,
77
77
  use: getStyleLoaders(context),
78
78
  },
79
- ].filter(Boolean)
79
+ ].filter(Boolean),
80
80
  );
81
81
 
82
82
  config.optimization = {
@@ -88,7 +88,7 @@ function applyStyleLoaders(config, context) {
88
88
  new MiniCssExtractPlugin({
89
89
  filename: 'widget.[contenthash].css',
90
90
  ...plugins.MiniCssExtractPlugin,
91
- })
91
+ }),
92
92
  );
93
93
 
94
94
  return config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkur/tool-webpack",
3
- "version": "0.31.0",
3
+ "version": "0.33.0",
4
4
  "description": "Merkur tool webpack.",
5
5
  "main": "index.cjs",
6
6
  "scripts": {
@@ -28,33 +28,33 @@
28
28
  },
29
29
  "homepage": "https://merkur.js.org/",
30
30
  "dependencies": {
31
- "@babel/core": "^7.17.9",
32
- "@babel/preset-env": "^7.16.11",
33
- "autoprefixer": "^10.4.4",
31
+ "@babel/core": "^7.21.8",
32
+ "@babel/preset-env": "^7.21.5",
33
+ "autoprefixer": "^10.4.14",
34
34
  "babel-loader": "9.1.2",
35
35
  "clean-webpack-plugin": "^4.0.0",
36
- "compression-webpack-plugin": "^9.2.0",
37
- "core-js": "^3.22.0",
38
- "css-loader": "^6.7.1",
39
- "css-minimizer-webpack-plugin": "^3.4.1",
36
+ "compression-webpack-plugin": "^10.0.0",
37
+ "core-js": "^3.30.2",
38
+ "css-loader": "^6.7.3",
39
+ "css-minimizer-webpack-plugin": "^5.0.0",
40
40
  "json-loader": "0.5.7",
41
- "less": "^4.1.2",
42
- "less-loader": "^10.2.0",
43
- "mini-css-extract-plugin": "^2.6.0",
44
- "postcss": "^8.4.12",
41
+ "less": "^4.1.3",
42
+ "less-loader": "^11.1.0",
43
+ "mini-css-extract-plugin": "^2.7.5",
44
+ "postcss": "^8.4.23",
45
45
  "postcss-flexbugs-fixes": "^5.0.2",
46
46
  "postcss-less": "^6.0.0",
47
- "postcss-loader": "^6.2.1",
48
- "postcss-preset-env": "^7.4.3",
49
- "source-map-loader": "^3.0.1",
50
- "webpack-bundle-analyzer": "^4.5.0",
47
+ "postcss-loader": "^7.3.0",
48
+ "postcss-preset-env": "^8.3.2",
49
+ "source-map-loader": "^4.0.1",
50
+ "webpack-bundle-analyzer": "^4.8.0",
51
51
  "webpack-manifest-plugin": "5.0.0",
52
52
  "webpack-modules": "1.0.0",
53
53
  "webpack-node-externals": "3.0.0",
54
- "webpack-shell-plugin-next": "^2.2.2"
54
+ "webpack-shell-plugin-next": "^2.3.1"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@merkur/tools": "*"
58
58
  },
59
- "gitHead": "ef1b38f23e43e2fd7ef6a2bec680fb40a2de3715"
59
+ "gitHead": "3e88b57abfad267ac3f3b20b2ae6bf50f93f5375"
60
60
  }
package/webpack/cache.cjs CHANGED
@@ -16,7 +16,7 @@ function createCacheKey(...args) {
16
16
  args
17
17
  .filter(Boolean)
18
18
  .map((value) => JSON.stringify(value))
19
- .join('')
19
+ .join(''),
20
20
  )
21
21
  .digest('hex');
22
22
  }