@nuxt/webpack-builder 3.8.2 → 3.9.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 +10 -12
- package/package.json +19 -19
package/dist/index.mjs
CHANGED
|
@@ -343,6 +343,10 @@ function registerVirtualModules() {
|
|
|
343
343
|
}));
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
+
function toArray(value) {
|
|
347
|
+
return Array.isArray(value) ? value : [value];
|
|
348
|
+
}
|
|
349
|
+
|
|
346
350
|
function createWebpackConfigContext(nuxt) {
|
|
347
351
|
return {
|
|
348
352
|
nuxt,
|
|
@@ -358,10 +362,7 @@ function createWebpackConfigContext(nuxt) {
|
|
|
358
362
|
};
|
|
359
363
|
}
|
|
360
364
|
function applyPresets(ctx, presets) {
|
|
361
|
-
|
|
362
|
-
presets = [presets];
|
|
363
|
-
}
|
|
364
|
-
for (const preset of presets) {
|
|
365
|
+
for (const preset of toArray(presets)) {
|
|
365
366
|
if (Array.isArray(preset)) {
|
|
366
367
|
preset[0](ctx, preset[1]);
|
|
367
368
|
} else {
|
|
@@ -598,8 +599,8 @@ function getEnv(ctx) {
|
|
|
598
599
|
const _env = {
|
|
599
600
|
"process.env.NODE_ENV": JSON.stringify(ctx.config.mode),
|
|
600
601
|
__NUXT_VERSION__: JSON.stringify(ctx.nuxt._version),
|
|
602
|
+
__NUXT_ASYNC_CONTEXT__: ctx.options.experimental.asyncContext,
|
|
601
603
|
"process.env.VUE_ENV": JSON.stringify(ctx.name),
|
|
602
|
-
"process.env.NUXT_ASYNC_CONTEXT": ctx.options.experimental.asyncContext,
|
|
603
604
|
"process.dev": ctx.options.dev,
|
|
604
605
|
"process.test": isTest,
|
|
605
606
|
"process.browser": ctx.isClient,
|
|
@@ -1034,10 +1035,7 @@ function vue(ctx) {
|
|
|
1034
1035
|
ctx.config.module.rules.push({
|
|
1035
1036
|
test: /\.vue$/i,
|
|
1036
1037
|
loader: "vue-loader",
|
|
1037
|
-
options:
|
|
1038
|
-
reactivityTransform: ctx.nuxt.options.experimental.reactivityTransform,
|
|
1039
|
-
...ctx.userConfig.loaders.vue
|
|
1040
|
-
}
|
|
1038
|
+
options: ctx.userConfig.loaders.vue
|
|
1041
1039
|
});
|
|
1042
1040
|
if (ctx.isClient) {
|
|
1043
1041
|
ctx.config.plugins.push(new VueSSRClientPlugin({
|
|
@@ -1123,7 +1121,7 @@ function clientHMR(ctx) {
|
|
|
1123
1121
|
function clientOptimization(_ctx) {
|
|
1124
1122
|
}
|
|
1125
1123
|
function clientPlugins(ctx) {
|
|
1126
|
-
if (!ctx.isDev && ctx.name === "client" && ctx.userConfig.analyze && (ctx.userConfig.analyze === true || ctx.userConfig.analyze.enabled)) {
|
|
1124
|
+
if (!ctx.isDev && !ctx.nuxt.options.test && ctx.name === "client" && ctx.userConfig.analyze && (ctx.userConfig.analyze === true || ctx.userConfig.analyze.enabled)) {
|
|
1127
1125
|
const statsDir = resolve(ctx.options.analyzeDir);
|
|
1128
1126
|
ctx.config.plugins.push(new BundleAnalyzerPlugin({
|
|
1129
1127
|
analyzerMode: "static",
|
|
@@ -1136,7 +1134,7 @@ function clientPlugins(ctx) {
|
|
|
1136
1134
|
}));
|
|
1137
1135
|
}
|
|
1138
1136
|
if (!ctx.nuxt.options.ssr) {
|
|
1139
|
-
if (ctx.nuxt.options.typescript.typeCheck === true || ctx.nuxt.options.typescript.typeCheck === "build" && !ctx.nuxt.options.dev) {
|
|
1137
|
+
if (!ctx.nuxt.options.test && (ctx.nuxt.options.typescript.typeCheck === true || ctx.nuxt.options.typescript.typeCheck === "build" && !ctx.nuxt.options.dev)) {
|
|
1140
1138
|
ctx.config.plugins.push(new ForkTSCheckerWebpackPlugin({
|
|
1141
1139
|
logger
|
|
1142
1140
|
}));
|
|
@@ -1239,7 +1237,7 @@ function serverPlugins(ctx) {
|
|
|
1239
1237
|
URLSearchParams: [ctx.userConfig.serverURLPolyfill, "URLSearchParams"]
|
|
1240
1238
|
}));
|
|
1241
1239
|
}
|
|
1242
|
-
if (ctx.nuxt.options.typescript.typeCheck === true || ctx.nuxt.options.typescript.typeCheck === "build" && !ctx.nuxt.options.dev) {
|
|
1240
|
+
if (!ctx.nuxt.options.test && (ctx.nuxt.options.typescript.typeCheck === true || ctx.nuxt.options.typescript.typeCheck === "build" && !ctx.nuxt.options.dev)) {
|
|
1243
1241
|
ctx.config.plugins.push(new ForkTSCheckerWebpackPlugin({
|
|
1244
1242
|
logger
|
|
1245
1243
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/webpack-builder",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@nuxt/friendly-errors-webpack-plugin": "^2.
|
|
25
|
+
"@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
|
|
26
26
|
"autoprefixer": "^10.4.16",
|
|
27
27
|
"css-loader": "^6.8.1",
|
|
28
28
|
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
29
|
-
"cssnano": "^6.0.
|
|
30
|
-
"defu": "^6.1.
|
|
29
|
+
"cssnano": "^6.0.3",
|
|
30
|
+
"defu": "^6.1.4",
|
|
31
31
|
"esbuild-loader": "^4.0.2",
|
|
32
32
|
"escape-string-regexp": "^5.0.0",
|
|
33
33
|
"estree-walker": "^3.0.3",
|
|
34
34
|
"file-loader": "^6.2.0",
|
|
35
35
|
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
|
36
|
-
"fs-extra": "^11.
|
|
37
|
-
"h3": "^1.
|
|
36
|
+
"fs-extra": "^11.2.0",
|
|
37
|
+
"h3": "^1.10.0",
|
|
38
38
|
"hash-sum": "^2.0.0",
|
|
39
39
|
"lodash-es": "4.17.21",
|
|
40
40
|
"magic-string": "^0.30.5",
|
|
@@ -44,26 +44,26 @@
|
|
|
44
44
|
"ohash": "^1.1.3",
|
|
45
45
|
"pathe": "^1.1.1",
|
|
46
46
|
"pify": "^6.1.0",
|
|
47
|
-
"postcss": "^8.4.
|
|
48
|
-
"postcss-import": "^
|
|
47
|
+
"postcss": "^8.4.33",
|
|
48
|
+
"postcss-import": "^16.0.0",
|
|
49
49
|
"postcss-import-resolver": "^2.0.0",
|
|
50
|
-
"postcss-loader": "^7.3.
|
|
50
|
+
"postcss-loader": "^7.3.4",
|
|
51
51
|
"postcss-url": "^10.1.3",
|
|
52
52
|
"pug-plain-loader": "^1.1.0",
|
|
53
|
-
"std-env": "^3.
|
|
53
|
+
"std-env": "^3.7.0",
|
|
54
54
|
"time-fix-plugin": "^2.0.7",
|
|
55
55
|
"ufo": "^1.3.2",
|
|
56
|
-
"unplugin": "^1.
|
|
56
|
+
"unplugin": "^1.6.0",
|
|
57
57
|
"url-loader": "^4.1.1",
|
|
58
58
|
"vue-bundle-renderer": "^2.0.0",
|
|
59
|
-
"vue-loader": "^17.
|
|
59
|
+
"vue-loader": "^17.4.2",
|
|
60
60
|
"webpack": "^5.89.0",
|
|
61
61
|
"webpack-bundle-analyzer": "^4.10.1",
|
|
62
|
-
"webpack-dev-middleware": "^
|
|
63
|
-
"webpack-hot-middleware": "^2.
|
|
64
|
-
"webpack-virtual-modules": "^0.6.
|
|
65
|
-
"webpackbar": "^
|
|
66
|
-
"@nuxt/kit": "3.
|
|
62
|
+
"webpack-dev-middleware": "^7.0.0",
|
|
63
|
+
"webpack-hot-middleware": "^2.26.0",
|
|
64
|
+
"webpack-virtual-modules": "^0.6.1",
|
|
65
|
+
"webpackbar": "^6.0.0",
|
|
66
|
+
"@nuxt/kit": "3.9.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/fs-extra": "11.0.4",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"@types/webpack-hot-middleware": "2.25.9",
|
|
74
74
|
"@types/webpack-virtual-modules": "0.1.3",
|
|
75
75
|
"unbuild": "latest",
|
|
76
|
-
"vue": "3.
|
|
77
|
-
"@nuxt/schema": "3.
|
|
76
|
+
"vue": "3.4.5",
|
|
77
|
+
"@nuxt/schema": "3.9.1"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"vue": "^3.3.4"
|