@nuxt/webpack-builder 3.5.0 → 3.5.2
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/README.md +1 -1
- package/dist/index.mjs +6 -3
- package/package.json +14 -13
package/README.md
CHANGED
|
@@ -115,7 +115,7 @@ Follow the docs to [Set Up Your Local Development Environment](https://nuxt.com/
|
|
|
115
115
|
|
|
116
116
|
## Nuxt 2
|
|
117
117
|
|
|
118
|
-
You can find the code for Nuxt 2 on the [`2.x` branch](https://github.com/nuxt/nuxt/tree/2.x) and the documentation at [
|
|
118
|
+
You can find the code for Nuxt 2 on the [`2.x` branch](https://github.com/nuxt/nuxt/tree/2.x) and the documentation at [v2.nuxt.com](https://v2.nuxt.com).
|
|
119
119
|
|
|
120
120
|
## Follow us
|
|
121
121
|
|
package/dist/index.mjs
CHANGED
|
@@ -32,6 +32,8 @@ import hash$1 from 'hash-sum';
|
|
|
32
32
|
import fse from 'fs-extra';
|
|
33
33
|
|
|
34
34
|
const stringTypes = ["Literal", "TemplateLiteral"];
|
|
35
|
+
const NUXT_LIB_RE = /node_modules\/nuxt3?\//;
|
|
36
|
+
const SUPPORTED_EXT_RE = /\.(m?[jt]sx?|vue)/;
|
|
35
37
|
const composableKeysPlugin = createUnplugin((options) => {
|
|
36
38
|
const composableMeta = Object.fromEntries(options.composables.map(({ name, ...meta }) => [name, meta]));
|
|
37
39
|
const maxLength = Math.max(...options.composables.map(({ argumentLength }) => argumentLength));
|
|
@@ -42,7 +44,7 @@ const composableKeysPlugin = createUnplugin((options) => {
|
|
|
42
44
|
enforce: "post",
|
|
43
45
|
transformInclude(id) {
|
|
44
46
|
const { pathname, search } = parseURL(decodeURIComponent(pathToFileURL(id).href));
|
|
45
|
-
return !
|
|
47
|
+
return !NUXT_LIB_RE.test(pathname) && SUPPORTED_EXT_RE.test(pathname) && parseQuery(search).type !== "style" && !parseQuery(search).macro;
|
|
46
48
|
},
|
|
47
49
|
transform(code, id) {
|
|
48
50
|
if (!KEYED_FUNCTIONS_RE.test(code)) {
|
|
@@ -826,6 +828,7 @@ class VueSSRClientPlugin {
|
|
|
826
828
|
}
|
|
827
829
|
}
|
|
828
830
|
|
|
831
|
+
const JS_MAP_RE = /\.js\.map$/;
|
|
829
832
|
class VueSSRServerPlugin {
|
|
830
833
|
constructor(options = {}) {
|
|
831
834
|
this.options = Object.assign({
|
|
@@ -870,7 +873,7 @@ class VueSSRServerPlugin {
|
|
|
870
873
|
} else {
|
|
871
874
|
bundle.files[asset.name] = asset.name;
|
|
872
875
|
}
|
|
873
|
-
} else if (asset.name
|
|
876
|
+
} else if (JS_MAP_RE.test(asset.name)) {
|
|
874
877
|
bundle.maps[asset.name.replace(/\.map$/, "")] = asset.name;
|
|
875
878
|
} else {
|
|
876
879
|
delete assets[asset.name];
|
|
@@ -990,7 +993,7 @@ function clientOptimization(_ctx) {
|
|
|
990
993
|
function clientPlugins(ctx) {
|
|
991
994
|
const { options, config } = ctx;
|
|
992
995
|
if (!ctx.isDev && ctx.name === "client" && options.webpack.analyze) {
|
|
993
|
-
const statsDir = resolve(options.
|
|
996
|
+
const statsDir = resolve(options.analyzeDir);
|
|
994
997
|
config.plugins.push(new BundleAnalyzerPlugin({
|
|
995
998
|
analyzerMode: "static",
|
|
996
999
|
defaultSizes: "gzip",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/webpack-builder",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"repository": "nuxt/nuxt",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@nuxt/friendly-errors-webpack-plugin": "^2.5.2",
|
|
20
20
|
"autoprefixer": "^10.4.14",
|
|
21
|
-
"css-loader": "^6.
|
|
21
|
+
"css-loader": "^6.8.1",
|
|
22
22
|
"css-minimizer-webpack-plugin": "^5.0.0",
|
|
23
23
|
"cssnano": "^6.0.1",
|
|
24
24
|
"esbuild-loader": "^3.0.1",
|
|
@@ -32,14 +32,14 @@
|
|
|
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.
|
|
35
|
+
"mini-css-extract-plugin": "^2.7.6",
|
|
36
|
+
"mlly": "^1.3.0",
|
|
37
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.24",
|
|
41
41
|
"postcss-import": "^15.1.0",
|
|
42
|
-
"postcss-loader": "^7.3.
|
|
42
|
+
"postcss-loader": "^7.3.2",
|
|
43
43
|
"postcss-url": "^10.1.3",
|
|
44
44
|
"std-env": "^3.3.3",
|
|
45
45
|
"time-fix-plugin": "^2.0.7",
|
|
@@ -47,27 +47,28 @@
|
|
|
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.2",
|
|
51
|
+
"webpack": "^5.84.1",
|
|
52
52
|
"webpack-bundle-analyzer": "^4.8.0",
|
|
53
|
-
"webpack-dev-middleware": "^6.1.
|
|
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.5.
|
|
57
|
+
"@nuxt/kit": "3.5.2"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
+
"@types/fs-extra": "^11.0.1",
|
|
60
61
|
"@types/lodash-es": "^4.17.7",
|
|
61
62
|
"@types/pify": "^5.0.1",
|
|
62
63
|
"@types/webpack-bundle-analyzer": "^4.6.0",
|
|
63
64
|
"@types/webpack-hot-middleware": "^2.25.6",
|
|
64
65
|
"@types/webpack-virtual-modules": "^0.1.1",
|
|
65
66
|
"unbuild": "latest",
|
|
66
|
-
"vue": "3.3.
|
|
67
|
-
"@nuxt/schema": "3.5.
|
|
67
|
+
"vue": "3.3.4",
|
|
68
|
+
"@nuxt/schema": "3.5.2"
|
|
68
69
|
},
|
|
69
70
|
"peerDependencies": {
|
|
70
|
-
"vue": "^3.3.
|
|
71
|
+
"vue": "^3.3.4"
|
|
71
72
|
},
|
|
72
73
|
"engines": {
|
|
73
74
|
"node": "^14.18.0 || >=16.10.0"
|