@nuxt/webpack-builder 4.2.1 → 4.3.0
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 +8 -6
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +1383 -1143
- package/dist/loaders/vue-module-identifier.mjs +16 -0
- package/package.json +31 -27
- package/dist/index.d.ts +0 -5
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { normalize, relative } from "pathe";
|
|
2
|
+
|
|
3
|
+
//#region src/loaders/vue-module-identifier.ts
|
|
4
|
+
const vueModuleIdentifierLoader = function(source) {
|
|
5
|
+
this.cacheable?.();
|
|
6
|
+
const { srcDir } = this.getOptions() || {};
|
|
7
|
+
const resourcePath = this.resourcePath || this._module?.resource;
|
|
8
|
+
if (!resourcePath || !source.includes("__exports__")) return source;
|
|
9
|
+
const context = srcDir || this.rootContext || this.context || this._compiler?.options?.context;
|
|
10
|
+
const moduleId = normalize(context ? relative(context, resourcePath) : resourcePath).replace(/^\.\//, "").replace(/\\/g, "/");
|
|
11
|
+
return source + `\n;__exports__.__moduleIdentifier = ${JSON.stringify(moduleId)};`;
|
|
12
|
+
};
|
|
13
|
+
var vue_module_identifier_default = vueModuleIdentifierLoader;
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { vue_module_identifier_default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/webpack-builder",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -10,15 +10,13 @@
|
|
|
10
10
|
"homepage": "https://nuxt.com",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"type": "module",
|
|
13
|
-
"types": "./dist/index.d.
|
|
13
|
+
"types": "./dist/index.d.mts",
|
|
14
14
|
"imports": {
|
|
15
|
-
"#builder": "./builder.mjs"
|
|
15
|
+
"#builder": "./builder.mjs",
|
|
16
|
+
"#vue-module-identifier": "./dist/loaders/vue-module-identifier.mjs"
|
|
16
17
|
},
|
|
17
18
|
"exports": {
|
|
18
|
-
".":
|
|
19
|
-
"types": "./dist/index.d.ts",
|
|
20
|
-
"import": "./dist/index.mjs"
|
|
21
|
-
},
|
|
19
|
+
".": "./dist/index.mjs",
|
|
22
20
|
"./dist/*": "./dist/*"
|
|
23
21
|
},
|
|
24
22
|
"files": [
|
|
@@ -27,21 +25,23 @@
|
|
|
27
25
|
],
|
|
28
26
|
"dependencies": {
|
|
29
27
|
"@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
|
|
30
|
-
"
|
|
28
|
+
"@vue/compiler-sfc": "3.5.27",
|
|
29
|
+
"autoprefixer": "^10.4.23",
|
|
31
30
|
"css-loader": "^7.1.2",
|
|
32
|
-
"css-minimizer-webpack-plugin": "^7.0.
|
|
31
|
+
"css-minimizer-webpack-plugin": "^7.0.4",
|
|
33
32
|
"cssnano": "^7.1.2",
|
|
34
33
|
"defu": "^6.1.4",
|
|
35
|
-
"esbuild-loader": "^4.4.
|
|
34
|
+
"esbuild-loader": "^4.4.2",
|
|
36
35
|
"escape-string-regexp": "^5.0.0",
|
|
36
|
+
"exsolve": "^1.0.8",
|
|
37
37
|
"file-loader": "^6.2.0",
|
|
38
38
|
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
|
39
|
-
"h3": "^1.15.4",
|
|
40
39
|
"jiti": "^2.6.1",
|
|
41
|
-
"knitwork": "^1.
|
|
40
|
+
"knitwork": "^1.3.0",
|
|
42
41
|
"magic-string": "^0.30.21",
|
|
43
|
-
"memfs": "^4.
|
|
44
|
-
"mini-css-extract-plugin": "^2.
|
|
42
|
+
"memfs": "^4.56.2",
|
|
43
|
+
"mini-css-extract-plugin": "^2.10.0",
|
|
44
|
+
"mlly": "^1.8.0",
|
|
45
45
|
"ohash": "^2.0.11",
|
|
46
46
|
"pathe": "^2.0.3",
|
|
47
47
|
"pify": "^6.1.0",
|
|
@@ -51,39 +51,43 @@
|
|
|
51
51
|
"postcss-loader": "^8.2.0",
|
|
52
52
|
"postcss-url": "^10.1.3",
|
|
53
53
|
"pug-plain-loader": "^1.1.0",
|
|
54
|
-
"seroval": "^1.
|
|
54
|
+
"seroval": "^1.4.2",
|
|
55
55
|
"std-env": "^3.10.0",
|
|
56
56
|
"time-fix-plugin": "^2.0.7",
|
|
57
57
|
"tinyglobby": "^0.2.15",
|
|
58
|
-
"ufo": "^1.6.
|
|
58
|
+
"ufo": "^1.6.3",
|
|
59
59
|
"unenv": "^2.0.0-rc.24",
|
|
60
|
-
"unplugin": "^2.3.
|
|
60
|
+
"unplugin": "^2.3.11",
|
|
61
61
|
"url-loader": "^4.1.1",
|
|
62
62
|
"vue-bundle-renderer": "^2.2.0",
|
|
63
63
|
"vue-loader": "^17.4.2",
|
|
64
|
-
"webpack": "^5.
|
|
65
|
-
"webpack-bundle-analyzer": "^
|
|
64
|
+
"webpack": "^5.104.1",
|
|
65
|
+
"webpack-bundle-analyzer": "^5.1.1",
|
|
66
66
|
"webpack-dev-middleware": "^7.4.5",
|
|
67
67
|
"webpack-hot-middleware": "^2.26.1",
|
|
68
68
|
"webpackbar": "^7.0.0",
|
|
69
|
-
"@nuxt/kit": "4.
|
|
69
|
+
"@nuxt/kit": "4.3.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@rspack/core": "1.
|
|
72
|
+
"@rspack/core": "1.7.2",
|
|
73
73
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
74
74
|
"@types/webpack-hot-middleware": "2.25.12",
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
75
|
+
"h3": "1.15.5",
|
|
76
|
+
"h3-next": "npm:h3@2.0.1-rc.9",
|
|
77
|
+
"obuild": "0.4.14",
|
|
78
|
+
"rollup": "4.55.2",
|
|
79
|
+
"vue": "3.5.27",
|
|
80
|
+
"@nuxt/schema": "4.3.0"
|
|
79
81
|
},
|
|
80
82
|
"peerDependencies": {
|
|
81
|
-
"vue": "^3.3.4"
|
|
83
|
+
"vue": "^3.3.4",
|
|
84
|
+
"nuxt": "4.3.0"
|
|
82
85
|
},
|
|
83
86
|
"engines": {
|
|
84
|
-
"node": "^
|
|
87
|
+
"node": "^20.9.0 || >=22.0.0"
|
|
85
88
|
},
|
|
86
89
|
"scripts": {
|
|
90
|
+
"build:stub": "obuild --stub",
|
|
87
91
|
"test:attw": "attw --pack"
|
|
88
92
|
}
|
|
89
93
|
}
|