@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 +29 -51
- package/README.md +1 -1
- package/index.cjs +0 -2
- package/module/babelLoader.cjs +10 -41
- package/module/styleLoader.cjs +2 -2
- package/package.json +18 -18
- package/webpack/cache.cjs +1 -1
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.
|
|
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
|
-
|
|
18
|
+
- ๐ธ remove ES5 Javascript ([cc782ad](https://github.com/mjancarik/merkur/commit/cc782adcdf8e19ddf79cba9e134dec6f96ec6893))
|
|
18
19
|
|
|
19
|
-
|
|
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.
|
|
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
|
-
|
|
39
|
-
|
|
43
|
+
- ๐ก move liveReloadServer to merkur/tools ([f81e0e8](https://github.com/mjancarik/merkur/commit/f81e0e89eff4a72985c89d23079be6a9344a3b2e))
|
|
40
44
|
|
|
41
45
|
### BREAKING CHANGES
|
|
42
46
|
|
|
43
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
87
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
110
|
-
module
|
|
87
|
+
- ๐งจ Extract webpack to alone module merkur/tool-webpack from merkur/tools
|
|
88
|
+
module
|
|
111
89
|
|
|
112
|
-
|
|
90
|
+
- ci: ๐ก add lock file for new module
|
|
113
91
|
|
|
114
|
-
|
|
92
|
+
- feat: ๐ธ add new module merkur/tool-webpack to dev dependencies
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|

|
|
12
12
|
[](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 [
|
|
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
|
};
|
package/module/babelLoader.cjs
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
};
|
package/module/styleLoader.cjs
CHANGED
|
@@ -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.
|
|
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.
|
|
32
|
-
"@babel/preset-env": "^7.
|
|
33
|
-
"autoprefixer": "^10.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": "^
|
|
37
|
-
"core-js": "^3.
|
|
38
|
-
"css-loader": "^6.7.
|
|
39
|
-
"css-minimizer-webpack-plugin": "^
|
|
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.
|
|
42
|
-
"less-loader": "^
|
|
43
|
-
"mini-css-extract-plugin": "^2.
|
|
44
|
-
"postcss": "^8.4.
|
|
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": "^
|
|
48
|
-
"postcss-preset-env": "^
|
|
49
|
-
"source-map-loader": "^
|
|
50
|
-
"webpack-bundle-analyzer": "^4.
|
|
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.
|
|
54
|
+
"webpack-shell-plugin-next": "^2.3.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@merkur/tools": "*"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "3e88b57abfad267ac3f3b20b2ae6bf50f93f5375"
|
|
60
60
|
}
|