@nuxt/webpack-builder 3.4.1 → 3.4.3
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 +23 -23
- package/package.json +11 -11
package/dist/index.mjs
CHANGED
|
@@ -22,6 +22,7 @@ import { cloneDeep, defaults as defaults$1, merge, uniq } from 'lodash-es';
|
|
|
22
22
|
import TimeFixPlugin from 'time-fix-plugin';
|
|
23
23
|
import WebpackBar from 'webpackbar';
|
|
24
24
|
import FriendlyErrorsWebpackPlugin from '@nuxt/friendly-errors-webpack-plugin';
|
|
25
|
+
import { isTest } from 'std-env';
|
|
25
26
|
import { EsbuildPlugin } from 'esbuild-loader';
|
|
26
27
|
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
27
28
|
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
|
|
@@ -102,7 +103,7 @@ const composableKeysPlugin = createUnplugin((options) => {
|
|
|
102
103
|
if (s.hasChanged()) {
|
|
103
104
|
return {
|
|
104
105
|
code: s.toString(),
|
|
105
|
-
map: options.sourcemap ? s.generateMap({
|
|
106
|
+
map: options.sourcemap ? s.generateMap({ hires: true }) : void 0
|
|
106
107
|
};
|
|
107
108
|
}
|
|
108
109
|
}
|
|
@@ -149,7 +150,7 @@ ${options.globalPublicPath} = buildAssetsURL();
|
|
|
149
150
|
`);
|
|
150
151
|
return {
|
|
151
152
|
code: s.toString(),
|
|
152
|
-
map: options.sourcemap ? s.generateMap({
|
|
153
|
+
map: options.sourcemap ? s.generateMap({ hires: true }) : void 0
|
|
153
154
|
};
|
|
154
155
|
}
|
|
155
156
|
};
|
|
@@ -373,28 +374,28 @@ function basePlugins(ctx) {
|
|
|
373
374
|
name: ctx.name,
|
|
374
375
|
color: colors[ctx.name],
|
|
375
376
|
reporters: ["stats"],
|
|
377
|
+
// @ts-expect-error TODO: this is a valid option for Webpack.ProgressPlugin and needs to be declared for WebpackBar
|
|
376
378
|
stats: !ctx.isDev,
|
|
377
379
|
reporter: {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
380
|
+
reporter: {
|
|
381
|
+
change: (_, { shortPath }) => {
|
|
382
|
+
if (!ctx.isServer) {
|
|
383
|
+
nuxt.callHook("webpack:change", shortPath);
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
done: ({ state }) => {
|
|
387
|
+
if (state.hasErrors) {
|
|
388
|
+
nuxt.callHook("webpack:error");
|
|
389
|
+
} else {
|
|
390
|
+
logger.success(`${state.name} ${state.message}`);
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
allDone: () => {
|
|
394
|
+
nuxt.callHook("webpack:done");
|
|
395
|
+
},
|
|
396
|
+
progress({ statesArray }) {
|
|
397
|
+
nuxt.callHook("webpack:progress", statesArray);
|
|
390
398
|
}
|
|
391
|
-
},
|
|
392
|
-
allDone: () => {
|
|
393
|
-
nuxt.callHook("webpack:done");
|
|
394
|
-
},
|
|
395
|
-
// @ts-ignore
|
|
396
|
-
progress({ statesArray }) {
|
|
397
|
-
nuxt.callHook("webpack:progress", statesArray);
|
|
398
399
|
}
|
|
399
400
|
}
|
|
400
401
|
}));
|
|
@@ -482,6 +483,7 @@ function getEnv(ctx) {
|
|
|
482
483
|
"process.env.NODE_ENV": JSON.stringify(ctx.config.mode),
|
|
483
484
|
"process.mode": JSON.stringify(ctx.config.mode),
|
|
484
485
|
"process.dev": options.dev,
|
|
486
|
+
"process.test": isTest,
|
|
485
487
|
__NUXT_VERSION__: JSON.stringify(ctx.nuxt._version),
|
|
486
488
|
"process.env.VUE_ENV": JSON.stringify(ctx.name),
|
|
487
489
|
"process.browser": ctx.isClient,
|
|
@@ -619,9 +621,7 @@ const getPostcssConfig = (nuxt) => {
|
|
|
619
621
|
postcssOptions = merge({}, defaultConfig(), postcssOptions);
|
|
620
622
|
loadPlugins(postcssOptions);
|
|
621
623
|
}
|
|
622
|
-
delete nuxt.options.webpack.postcss.order;
|
|
623
624
|
return {
|
|
624
|
-
// @ts-expect-error
|
|
625
625
|
sourceMap: nuxt.options.webpack.cssSourceMap,
|
|
626
626
|
...nuxt.options.webpack.postcss,
|
|
627
627
|
postcssOptions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/webpack-builder",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.3",
|
|
4
4
|
"repository": "nuxt/nuxt",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@babel/core": "^7.21.4",
|
|
20
19
|
"@nuxt/friendly-errors-webpack-plugin": "^2.5.2",
|
|
21
20
|
"autoprefixer": "^10.4.14",
|
|
22
21
|
"css-loader": "^6.7.3",
|
|
@@ -28,33 +27,34 @@
|
|
|
28
27
|
"file-loader": "^6.2.0",
|
|
29
28
|
"fork-ts-checker-webpack-plugin": "^8.0.0",
|
|
30
29
|
"fs-extra": "^11.1.1",
|
|
30
|
+
"h3": "^1.6.4",
|
|
31
31
|
"hash-sum": "^2.0.0",
|
|
32
32
|
"lodash-es": "^4.17.21",
|
|
33
33
|
"magic-string": "^0.30.0",
|
|
34
|
-
"memfs": "^3.5.
|
|
34
|
+
"memfs": "^3.5.1",
|
|
35
35
|
"mini-css-extract-plugin": "^2.7.5",
|
|
36
36
|
"mlly": "^1.2.0",
|
|
37
|
-
"ohash": "^1.
|
|
37
|
+
"ohash": "^1.1.2",
|
|
38
38
|
"pathe": "^1.1.0",
|
|
39
39
|
"pify": "^6.1.0",
|
|
40
|
-
"postcss": "^8.4.
|
|
40
|
+
"postcss": "^8.4.23",
|
|
41
41
|
"postcss-import": "^15.1.0",
|
|
42
42
|
"postcss-loader": "^7.2.4",
|
|
43
43
|
"postcss-url": "^10.1.3",
|
|
44
|
-
"
|
|
44
|
+
"std-env": "^3.3.2",
|
|
45
45
|
"time-fix-plugin": "^2.0.7",
|
|
46
46
|
"ufo": "^1.1.1",
|
|
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.0
|
|
51
|
-
"webpack": "^5.
|
|
50
|
+
"vue-loader": "^17.1.0",
|
|
51
|
+
"webpack": "^5.81.0",
|
|
52
52
|
"webpack-bundle-analyzer": "^4.8.0",
|
|
53
53
|
"webpack-dev-middleware": "^6.0.2",
|
|
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.4.
|
|
57
|
+
"@nuxt/kit": "3.4.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/lodash-es": "^4.17.7",
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
"@types/webpack-virtual-modules": "^0.1.1",
|
|
65
65
|
"unbuild": "latest",
|
|
66
66
|
"vue": "3.2.47",
|
|
67
|
-
"@nuxt/schema": "3.4.
|
|
67
|
+
"@nuxt/schema": "3.4.3"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"vue": "^3.2.47"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
|
-
"node": "^14.18.0 ||
|
|
73
|
+
"node": "^14.18.0 || >=16.10.0"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {}
|
|
76
76
|
}
|