@nuxt/webpack-builder 3.4.3 → 3.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/dist/index.mjs +12 -11
- package/package.json +16 -16
package/dist/index.mjs
CHANGED
|
@@ -249,16 +249,14 @@ function fileName(ctx, key) {
|
|
|
249
249
|
return fileName2;
|
|
250
250
|
}
|
|
251
251
|
function getWebpackConfig(ctx) {
|
|
252
|
-
const {
|
|
253
|
-
const builder = {};
|
|
254
|
-
const loaders = [];
|
|
255
|
-
const { extend } = options.build;
|
|
252
|
+
const { extend } = ctx.options.build;
|
|
256
253
|
if (typeof extend === "function") {
|
|
254
|
+
logger.warn("[nuxt] The `build.extend` and `webpack.build.extend` properties have been deprecated in Nuxt 3 for some time and will be removed in a future minor release. Instead, you can extend webpack config using the `webpack:config` hook.");
|
|
257
255
|
const extendedConfig = extend.call(
|
|
258
|
-
|
|
259
|
-
config,
|
|
260
|
-
{ loaders, ...ctx }
|
|
261
|
-
) || config;
|
|
256
|
+
{},
|
|
257
|
+
ctx.config,
|
|
258
|
+
{ loaders: [], ...ctx }
|
|
259
|
+
) || ctx.config;
|
|
262
260
|
const pragma = /@|#/;
|
|
263
261
|
const { devtool } = extendedConfig;
|
|
264
262
|
if (typeof devtool === "string" && pragma.test(devtool)) {
|
|
@@ -267,7 +265,7 @@ function getWebpackConfig(ctx) {
|
|
|
267
265
|
}
|
|
268
266
|
return extendedConfig;
|
|
269
267
|
}
|
|
270
|
-
return cloneDeep(config);
|
|
268
|
+
return cloneDeep(ctx.config);
|
|
271
269
|
}
|
|
272
270
|
|
|
273
271
|
function assets(ctx) {
|
|
@@ -992,7 +990,7 @@ function clientOptimization(_ctx) {
|
|
|
992
990
|
function clientPlugins(ctx) {
|
|
993
991
|
const { options, config } = ctx;
|
|
994
992
|
if (!ctx.isDev && ctx.name === "client" && options.webpack.analyze) {
|
|
995
|
-
const statsDir = resolve(options.
|
|
993
|
+
const statsDir = resolve(options.analyzeDir);
|
|
996
994
|
config.plugins.push(new BundleAnalyzerPlugin({
|
|
997
995
|
analyzerMode: "static",
|
|
998
996
|
defaultSizes: "gzip",
|
|
@@ -1121,7 +1119,7 @@ async function bundle(nuxt) {
|
|
|
1121
1119
|
});
|
|
1122
1120
|
await nuxt.callHook("webpack:config", webpackConfigs);
|
|
1123
1121
|
const mfs = nuxt.options.dev ? createMFS() : null;
|
|
1124
|
-
const
|
|
1122
|
+
for (const config of webpackConfigs) {
|
|
1125
1123
|
config.plugins.push(DynamicBasePlugin.webpack({
|
|
1126
1124
|
sourcemap: nuxt.options.sourcemap[config.name]
|
|
1127
1125
|
}));
|
|
@@ -1133,6 +1131,9 @@ async function bundle(nuxt) {
|
|
|
1133
1131
|
rootDir: nuxt.options.rootDir,
|
|
1134
1132
|
composables: nuxt.options.optimization.keyedComposables
|
|
1135
1133
|
}));
|
|
1134
|
+
}
|
|
1135
|
+
await nuxt.callHook("webpack:configResolved", webpackConfigs);
|
|
1136
|
+
const compilers = webpackConfigs.map((config) => {
|
|
1136
1137
|
const compiler = webpack(config);
|
|
1137
1138
|
if (nuxt.options.dev) {
|
|
1138
1139
|
compiler.outputFileSystem = mfs;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/webpack-builder",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"repository": "nuxt/nuxt",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -18,43 +18,43 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@nuxt/friendly-errors-webpack-plugin": "^2.5.2",
|
|
20
20
|
"autoprefixer": "^10.4.14",
|
|
21
|
-
"css-loader": "^6.7.
|
|
21
|
+
"css-loader": "^6.7.4",
|
|
22
22
|
"css-minimizer-webpack-plugin": "^5.0.0",
|
|
23
|
-
"cssnano": "^6.0.
|
|
23
|
+
"cssnano": "^6.0.1",
|
|
24
24
|
"esbuild-loader": "^3.0.1",
|
|
25
25
|
"escape-string-regexp": "^5.0.0",
|
|
26
26
|
"estree-walker": "^3.0.3",
|
|
27
27
|
"file-loader": "^6.2.0",
|
|
28
28
|
"fork-ts-checker-webpack-plugin": "^8.0.0",
|
|
29
29
|
"fs-extra": "^11.1.1",
|
|
30
|
-
"h3": "^1.6.
|
|
30
|
+
"h3": "^1.6.6",
|
|
31
31
|
"hash-sum": "^2.0.0",
|
|
32
32
|
"lodash-es": "^4.17.21",
|
|
33
33
|
"magic-string": "^0.30.0",
|
|
34
34
|
"memfs": "^3.5.1",
|
|
35
|
-
"mini-css-extract-plugin": "^2.7.
|
|
36
|
-
"mlly": "^1.2.
|
|
35
|
+
"mini-css-extract-plugin": "^2.7.6",
|
|
36
|
+
"mlly": "^1.2.1",
|
|
37
37
|
"ohash": "^1.1.2",
|
|
38
38
|
"pathe": "^1.1.0",
|
|
39
39
|
"pify": "^6.1.0",
|
|
40
40
|
"postcss": "^8.4.23",
|
|
41
41
|
"postcss-import": "^15.1.0",
|
|
42
|
-
"postcss-loader": "^7.
|
|
42
|
+
"postcss-loader": "^7.3.0",
|
|
43
43
|
"postcss-url": "^10.1.3",
|
|
44
|
-
"std-env": "^3.3.
|
|
44
|
+
"std-env": "^3.3.3",
|
|
45
45
|
"time-fix-plugin": "^2.0.7",
|
|
46
|
-
"ufo": "^1.1.
|
|
46
|
+
"ufo": "^1.1.2",
|
|
47
47
|
"unplugin": "^1.3.1",
|
|
48
48
|
"url-loader": "^4.1.1",
|
|
49
49
|
"vue-bundle-renderer": "^1.0.3",
|
|
50
|
-
"vue-loader": "^17.1.
|
|
51
|
-
"webpack": "^5.
|
|
50
|
+
"vue-loader": "^17.1.1",
|
|
51
|
+
"webpack": "^5.83.1",
|
|
52
52
|
"webpack-bundle-analyzer": "^4.8.0",
|
|
53
|
-
"webpack-dev-middleware": "^6.
|
|
53
|
+
"webpack-dev-middleware": "^6.1.1",
|
|
54
54
|
"webpack-hot-middleware": "^2.25.3",
|
|
55
55
|
"webpack-virtual-modules": "^0.5.0",
|
|
56
56
|
"webpackbar": "^5.0.2",
|
|
57
|
-
"@nuxt/kit": "3.
|
|
57
|
+
"@nuxt/kit": "3.5.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/lodash-es": "^4.17.7",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"@types/webpack-hot-middleware": "^2.25.6",
|
|
64
64
|
"@types/webpack-virtual-modules": "^0.1.1",
|
|
65
65
|
"unbuild": "latest",
|
|
66
|
-
"vue": "3.
|
|
67
|
-
"@nuxt/schema": "3.
|
|
66
|
+
"vue": "3.3.4",
|
|
67
|
+
"@nuxt/schema": "3.5.1"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"vue": "^3.
|
|
70
|
+
"vue": "^3.3.4"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
73
|
"node": "^14.18.0 || >=16.10.0"
|