@merkur/tool-webpack 0.27.4 โ 0.28.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 +18 -0
- package/index.cjs +4 -2
- package/module/babelLoader.cjs +1 -1
- package/package.json +23 -21
- package/webpack/cache.cjs +1 -1
- package/webpack/liveReloadServer.cjs +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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.28.0](https://github.com/mjancarik/merkur/compare/v0.27.6...v0.28.0) (2022-04-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Code Refactoring
|
|
10
|
+
|
|
11
|
+
* ๐ก move liveReloadServer to merkur/tools ([f81e0e8](https://github.com/mjancarik/merkur/commit/f81e0e89eff4a72985c89d23079be6a9344a3b2e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* ๐งจ The liveReloadServer.cjs file is moved to @merkur/tools. The
|
|
17
|
+
@merkur/tool-webpack re-export createLiveReloadServer for keeping
|
|
18
|
+
backward compatability.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [0.27.4](https://github.com/mjancarik/merkur/compare/v0.27.3...v0.27.4) (2021-10-06)
|
|
7
25
|
|
|
8
26
|
|
package/index.cjs
CHANGED
|
@@ -9,7 +9,9 @@ const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
9
9
|
const CompressionPlugin = require('compression-webpack-plugin');
|
|
10
10
|
|
|
11
11
|
const { createCache, createCacheKey } = require('./webpack/cache.cjs');
|
|
12
|
-
const {
|
|
12
|
+
const {
|
|
13
|
+
createLiveReloadServer,
|
|
14
|
+
} = require('@merkur/tools/liveReloadServer.cjs');
|
|
13
15
|
const { applyBundleAnalyzer } = require('./module/bundleAnalyzer.cjs');
|
|
14
16
|
const {
|
|
15
17
|
findLoaders,
|
|
@@ -168,7 +170,7 @@ function createWebConfig(config, context) {
|
|
|
168
170
|
module: {
|
|
169
171
|
...baseConfig?.module,
|
|
170
172
|
rules: [
|
|
171
|
-
...baseConfig?.module?.rules,
|
|
173
|
+
...(baseConfig?.module?.rules ?? []),
|
|
172
174
|
{
|
|
173
175
|
test: /\.m?js/,
|
|
174
176
|
resolve: {
|
package/module/babelLoader.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkur/tool-webpack",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Merkur tool webpack.",
|
|
5
5
|
"main": "index.cjs",
|
|
6
6
|
"scripts": {
|
|
@@ -28,31 +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.
|
|
34
|
-
"babel-loader": "8.2.
|
|
31
|
+
"@babel/core": "^7.17.9",
|
|
32
|
+
"@babel/preset-env": "^7.16.11",
|
|
33
|
+
"autoprefixer": "^10.4.4",
|
|
34
|
+
"babel-loader": "8.2.4",
|
|
35
35
|
"clean-webpack-plugin": "^4.0.0",
|
|
36
|
-
"compression-webpack-plugin": "^9.
|
|
37
|
-
"core-js": "^3.
|
|
38
|
-
"css-loader": "^6.
|
|
39
|
-
"css-minimizer-webpack-plugin": "^3.
|
|
40
|
-
"find-free-port": "^2.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",
|
|
41
40
|
"json-loader": "0.5.7",
|
|
42
|
-
"less": "^4.1.
|
|
43
|
-
"less-loader": "^10.0
|
|
44
|
-
"mini-css-extract-plugin": "^2.
|
|
45
|
-
"postcss": "^8.
|
|
41
|
+
"less": "^4.1.2",
|
|
42
|
+
"less-loader": "^10.2.0",
|
|
43
|
+
"mini-css-extract-plugin": "^2.6.0",
|
|
44
|
+
"postcss": "^8.4.12",
|
|
46
45
|
"postcss-flexbugs-fixes": "^5.0.2",
|
|
47
|
-
"postcss-less": "^
|
|
48
|
-
"postcss-loader": "^6.
|
|
49
|
-
"postcss-preset-env": "^
|
|
50
|
-
"source-map-loader": "^3.0.
|
|
51
|
-
"webpack-bundle-analyzer": "^4.
|
|
52
|
-
"webpack-manifest-plugin": "
|
|
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",
|
|
51
|
+
"webpack-manifest-plugin": "5.0.0",
|
|
53
52
|
"webpack-modules": "1.0.0",
|
|
54
53
|
"webpack-node-externals": "3.0.0",
|
|
55
54
|
"webpack-shell-plugin-next": "^2.2.2"
|
|
56
55
|
},
|
|
57
|
-
"
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"@merkur/tools": "*"
|
|
58
|
+
},
|
|
59
|
+
"gitHead": "8760a1cedbbfc37348055418bacbfc69199a3c06"
|
|
58
60
|
}
|
package/webpack/cache.cjs
CHANGED
|
@@ -16,7 +16,7 @@ function createCacheKey(...args) {
|
|
|
16
16
|
function createCache({ cwd, cache, environment }) {
|
|
17
17
|
return {
|
|
18
18
|
type: 'filesystem',
|
|
19
|
-
version: createCacheKey(environment, ...cache?.versionDependencies),
|
|
19
|
+
version: createCacheKey(environment, ...(cache?.versionDependencies ?? [])),
|
|
20
20
|
buildDependencies: {
|
|
21
21
|
defaultWebpack: ['webpack/lib/'],
|
|
22
22
|
config: [path.resolve(cwd, 'webpack.config.js')].filter(fs.existsSync),
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const fp = require('find-free-port');
|
|
2
|
-
const WebSocket = require('@merkur/tools/websocket.cjs');
|
|
3
|
-
|
|
4
|
-
async function createLiveReloadServer() {
|
|
5
|
-
if (process.env.NODE_ENV === 'development') {
|
|
6
|
-
try {
|
|
7
|
-
const [freePort] = await fp(4321);
|
|
8
|
-
process.env.MERKUR_PLAYGROUND_LIVERELOAD_PORT = freePort;
|
|
9
|
-
|
|
10
|
-
WebSocket.createServer({
|
|
11
|
-
port: freePort,
|
|
12
|
-
});
|
|
13
|
-
} catch (error) {
|
|
14
|
-
console.error(error);
|
|
15
|
-
throw new Error('Unable to retrieve free port for livereload server.');
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
module.exports = { createLiveReloadServer };
|