@workleap/webpack-configs 1.4.2 → 1.5.1
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 +12 -0
- package/dist/build.d.ts +0 -2
- package/dist/build.js +1 -1
- package/dist/{chunk-N4YYH3H2.js → chunk-CW54GSNS.js} +4 -38
- package/dist/{chunk-AKXI7IRH.js → chunk-JU2EHEXW.js} +2 -32
- package/dist/dev.d.ts +0 -1
- package/dist/dev.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +6 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @workleap/webpack-configs
|
|
2
2
|
|
|
3
|
+
## 1.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#201](https://github.com/gsoft-inc/wl-web-configs/pull/201) [`de5804b`](https://github.com/gsoft-inc/wl-web-configs/commit/de5804b352496fe0a6d4e01a5b6bb5e6a56aca18) Thanks [@bsokol-wl](https://github.com/bsokol-wl)! - Remove hashes from chunk file names and asset/resource file names in order to prevent chunk load errors for users during a deployment
|
|
8
|
+
|
|
9
|
+
## 1.5.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#190](https://github.com/gsoft-inc/wl-web-configs/pull/190) [`b6246b3`](https://github.com/gsoft-inc/wl-web-configs/commit/b6246b30a505821e36b09579fb14e3c0f99c963a) Thanks [@bsokol-wl](https://github.com/bsokol-wl)! - Enable in-memory webpack cache by default
|
|
14
|
+
|
|
3
15
|
## 1.4.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/build.d.ts
CHANGED
|
@@ -15,8 +15,6 @@ interface DefineBuildConfigOptions {
|
|
|
15
15
|
entry?: string;
|
|
16
16
|
outputPath?: string;
|
|
17
17
|
publicPath?: `${string}/` | "auto";
|
|
18
|
-
cache?: boolean;
|
|
19
|
-
cacheDirectory?: string;
|
|
20
18
|
moduleRules?: NonNullable<Configuration["module"]>["rules"];
|
|
21
19
|
plugins?: Configuration["plugins"];
|
|
22
20
|
htmlWebpackPlugin?: boolean | HtmlWebpackPlugin.Options;
|
package/dist/build.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { defineBuildConfig, defineBuildHtmlWebpackPluginConfig, defineMiniCssExtractPluginConfig, getOptimizationConfig } from './chunk-
|
|
1
|
+
export { defineBuildConfig, defineBuildHtmlWebpackPluginConfig, defineMiniCssExtractPluginConfig, getOptimizationConfig } from './chunk-CW54GSNS.js';
|
|
2
2
|
import './chunk-2YARCRX5.js';
|
|
3
3
|
import './chunk-5ACA7GOB.js';
|
|
@@ -4,13 +4,11 @@ import HtmlWebpackPlugin from 'html-webpack-plugin';
|
|
|
4
4
|
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
5
5
|
import { createRequire } from 'node:module';
|
|
6
6
|
import path from 'node:path';
|
|
7
|
-
import { fileURLToPath } from 'node:url';
|
|
8
7
|
import TerserPlugin from 'terser-webpack-plugin';
|
|
9
8
|
import webpack from 'webpack';
|
|
10
9
|
|
|
11
10
|
var DefinePlugin = webpack.DefinePlugin;
|
|
12
11
|
var require2 = createRequire(import.meta.url);
|
|
13
|
-
var __filename = fileURLToPath(import.meta.url);
|
|
14
12
|
function defineBuildHtmlWebpackPluginConfig(options = {}) {
|
|
15
13
|
const {
|
|
16
14
|
template = path.resolve("./public/index.html"),
|
|
@@ -23,7 +21,7 @@ function defineBuildHtmlWebpackPluginConfig(options = {}) {
|
|
|
23
21
|
}
|
|
24
22
|
function defineMiniCssExtractPluginConfig(options = {}) {
|
|
25
23
|
const {
|
|
26
|
-
filename = "[name].
|
|
24
|
+
filename = "[name].css",
|
|
27
25
|
...rest
|
|
28
26
|
} = options;
|
|
29
27
|
return {
|
|
@@ -86,8 +84,6 @@ function defineBuildConfig(swcConfig, options = {}) {
|
|
|
86
84
|
outputPath = path.resolve("dist"),
|
|
87
85
|
// The trailing / is very important, otherwise paths will not be resolved correctly.
|
|
88
86
|
publicPath = "http://localhost:8080/",
|
|
89
|
-
cache = true,
|
|
90
|
-
cacheDirectory = path.resolve("node_modules/.cache/webpack"),
|
|
91
87
|
moduleRules = [],
|
|
92
88
|
plugins = [],
|
|
93
89
|
htmlWebpackPlugin = defineBuildHtmlWebpackPluginConfig(),
|
|
@@ -107,41 +103,11 @@ function defineBuildConfig(swcConfig, options = {}) {
|
|
|
107
103
|
entry,
|
|
108
104
|
output: {
|
|
109
105
|
path: outputPath,
|
|
110
|
-
filename: "[name].
|
|
106
|
+
filename: "[name].js",
|
|
111
107
|
publicPath,
|
|
112
|
-
clean: true
|
|
108
|
+
clean: true,
|
|
109
|
+
assetModuleFilename: "[name][ext][query]"
|
|
113
110
|
},
|
|
114
|
-
cache: cache && {
|
|
115
|
-
type: "filesystem",
|
|
116
|
-
allowCollectingMemory: false,
|
|
117
|
-
cacheDirectory,
|
|
118
|
-
maxMemoryGenerations: 1,
|
|
119
|
-
// Took from https://webpack.js.org/configuration/cache/#cachebuilddependencies.
|
|
120
|
-
buildDependencies: {
|
|
121
|
-
config: [__filename]
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
// (ACTUALLY NOT FIXING ANYTHING AT THE MOMENT)
|
|
125
|
-
// Fixes caching for environmental variables using the DefinePlugin by forcing
|
|
126
|
-
// webpack caching to prioritize hashes over timestamps.
|
|
127
|
-
snapshot: cache ? {
|
|
128
|
-
buildDependencies: {
|
|
129
|
-
hash: true,
|
|
130
|
-
timestamp: true
|
|
131
|
-
},
|
|
132
|
-
module: {
|
|
133
|
-
hash: true,
|
|
134
|
-
timestamp: true
|
|
135
|
-
},
|
|
136
|
-
resolve: {
|
|
137
|
-
hash: true,
|
|
138
|
-
timestamp: true
|
|
139
|
-
},
|
|
140
|
-
resolveBuildDependencies: {
|
|
141
|
-
hash: true,
|
|
142
|
-
timestamp: true
|
|
143
|
-
}
|
|
144
|
-
} : void 0,
|
|
145
111
|
optimization: getOptimizationConfig(optimize),
|
|
146
112
|
infrastructureLogging: verbose ? {
|
|
147
113
|
appendOnly: true,
|
|
@@ -4,13 +4,11 @@ import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
|
|
|
4
4
|
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
|
5
5
|
import { createRequire } from 'node:module';
|
|
6
6
|
import path from 'node:path';
|
|
7
|
-
import { fileURLToPath } from 'node:url';
|
|
8
7
|
import webpack from 'webpack';
|
|
9
8
|
import 'webpack-dev-server';
|
|
10
9
|
|
|
11
10
|
var DefinePlugin = webpack.DefinePlugin;
|
|
12
11
|
var require2 = createRequire(import.meta.url);
|
|
13
|
-
var __filename = fileURLToPath(import.meta.url);
|
|
14
12
|
function defineDevHtmlWebpackPluginConfig(options = {}) {
|
|
15
13
|
const {
|
|
16
14
|
template = path.resolve("./public/index.html"),
|
|
@@ -50,7 +48,6 @@ function defineDevConfig(swcConfig, options = {}) {
|
|
|
50
48
|
port = 8080,
|
|
51
49
|
publicPath,
|
|
52
50
|
cache = true,
|
|
53
|
-
cacheDirectory = path.resolve("node_modules/.cache/webpack"),
|
|
54
51
|
moduleRules = [],
|
|
55
52
|
plugins = [],
|
|
56
53
|
htmlWebpackPlugin = defineDevHtmlWebpackPluginConfig(),
|
|
@@ -89,36 +86,9 @@ function defineDevConfig(swcConfig, options = {}) {
|
|
|
89
86
|
publicPath: publicPath ?? `${https ? "https" : "http"}://${host}:${port}/`
|
|
90
87
|
},
|
|
91
88
|
cache: cache && {
|
|
92
|
-
type: "
|
|
93
|
-
|
|
94
|
-
maxMemoryGenerations: 1,
|
|
95
|
-
cacheDirectory,
|
|
96
|
-
// Took from https://webpack.js.org/configuration/cache/#cachebuilddependencies.
|
|
97
|
-
buildDependencies: {
|
|
98
|
-
config: [__filename]
|
|
99
|
-
}
|
|
89
|
+
type: "memory",
|
|
90
|
+
maxGenerations: 1
|
|
100
91
|
},
|
|
101
|
-
// (ACTUALLY NOT FIXING ANYTHING AT THE MOMENT)
|
|
102
|
-
// Fixes caching for environmental variables using the DefinePlugin by forcing
|
|
103
|
-
// webpack caching to prioritize hashes over timestamps.
|
|
104
|
-
snapshot: cache ? {
|
|
105
|
-
buildDependencies: {
|
|
106
|
-
hash: true,
|
|
107
|
-
timestamp: true
|
|
108
|
-
},
|
|
109
|
-
module: {
|
|
110
|
-
hash: true,
|
|
111
|
-
timestamp: true
|
|
112
|
-
},
|
|
113
|
-
resolve: {
|
|
114
|
-
hash: true,
|
|
115
|
-
timestamp: true
|
|
116
|
-
},
|
|
117
|
-
resolveBuildDependencies: {
|
|
118
|
-
hash: true,
|
|
119
|
-
timestamp: true
|
|
120
|
-
}
|
|
121
|
-
} : void 0,
|
|
122
92
|
// See: https://webpack.js.org/guides/build-performance/#avoid-extra-optimization-steps
|
|
123
93
|
optimization: {
|
|
124
94
|
// Keep "runtimeChunk" to false, otherwise it breaks module federation
|
package/dist/dev.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ interface DefineDevConfigOptions {
|
|
|
15
15
|
port?: number;
|
|
16
16
|
publicPath?: `${string}/` | "auto";
|
|
17
17
|
cache?: boolean;
|
|
18
|
-
cacheDirectory?: string;
|
|
19
18
|
moduleRules?: NonNullable<Configuration["module"]>["rules"];
|
|
20
19
|
plugins?: Configuration["plugins"];
|
|
21
20
|
htmlWebpackPlugin?: boolean | HtmlWebpackPlugin.Options;
|
package/dist/dev.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { defineDevConfig, defineDevHtmlWebpackPluginConfig, defineFastRefreshPluginConfig } from './chunk-
|
|
1
|
+
export { defineDevConfig, defineDevHtmlWebpackPluginConfig, defineFastRefreshPluginConfig } from './chunk-JU2EHEXW.js';
|
|
2
2
|
import './chunk-2YARCRX5.js';
|
|
3
3
|
import './chunk-5ACA7GOB.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { defineBuildConfig, defineBuildHtmlWebpackPluginConfig, defineMiniCssExtractPluginConfig, getOptimizationConfig } from './chunk-
|
|
2
|
-
export { defineDevConfig, defineDevHtmlWebpackPluginConfig, defineFastRefreshPluginConfig } from './chunk-
|
|
1
|
+
export { defineBuildConfig, defineBuildHtmlWebpackPluginConfig, defineMiniCssExtractPluginConfig, getOptimizationConfig } from './chunk-CW54GSNS.js';
|
|
2
|
+
export { defineDevConfig, defineDevHtmlWebpackPluginConfig, defineFastRefreshPluginConfig } from './chunk-JU2EHEXW.js';
|
|
3
3
|
import './chunk-2YARCRX5.js';
|
|
4
4
|
import './chunk-5ACA7GOB.js';
|
|
5
5
|
export { addAfterModuleRule, addBeforeModuleRule, findModuleRule, findModuleRules, matchAssetModuleType, matchLoaderName, matchTest, removeModuleRules, replaceModuleRule } from './chunk-34O5ZLZ6.js';
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@workleap/webpack-configs",
|
|
3
3
|
"author": "Workleap",
|
|
4
4
|
"description": "Workleap recommended webpack config.",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.5.1",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"workleap",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"browserslist": "*",
|
|
34
34
|
"postcss": "*",
|
|
35
35
|
"webpack": ">=5.0.0",
|
|
36
|
-
"webpack-dev-server": ">=
|
|
36
|
+
"webpack-dev-server": ">=5.0.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
|
39
39
|
"webpack-dev-server": {
|
|
@@ -42,22 +42,17 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@svgr/core": "8.1.0",
|
|
45
|
-
"@swc/core": "1.4.
|
|
45
|
+
"@swc/core": "1.4.12",
|
|
46
|
+
"@swc/helpers": "0.5.8",
|
|
46
47
|
"@swc/jest": "0.2.36",
|
|
47
48
|
"@types/jest": "29.5.12",
|
|
48
49
|
"@types/node": "20.11.25",
|
|
49
|
-
"browserslist": "4.23.0",
|
|
50
50
|
"jest": "29.7.0",
|
|
51
|
-
"postcss": "8.4.35",
|
|
52
|
-
"postcss-load-config": "5.0.3",
|
|
53
|
-
"ts-node": "10.9.2",
|
|
54
51
|
"tsup": "8.0.2",
|
|
55
52
|
"typescript": "5.4.2",
|
|
56
|
-
"
|
|
57
|
-
"webpack-dev-server": "5.0.2",
|
|
58
|
-
"@workleap/eslint-plugin": "3.1.0",
|
|
53
|
+
"@workleap/eslint-plugin": "3.2.1",
|
|
59
54
|
"@workleap/swc-configs": "2.2.3",
|
|
60
|
-
"@workleap/tsup-configs": "3.0.
|
|
55
|
+
"@workleap/tsup-configs": "3.0.6",
|
|
61
56
|
"@workleap/typescript-configs": "3.0.2"
|
|
62
57
|
},
|
|
63
58
|
"dependencies": {
|