@nuxt/vite-builder-nightly 4.0.0-28720239.4d368103 → 4.0.0-28724968.fefe4e5c
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 +22 -2
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -337,13 +337,17 @@ function createViteNodeApp(ctx, invalidates = /* @__PURE__ */ new Set()) {
|
|
|
337
337
|
/* Restricted */
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
|
-
const module = await node.fetchModule(moduleId).catch((err) => {
|
|
340
|
+
const module = await node.fetchModule(moduleId).catch(async (err) => {
|
|
341
341
|
const errorData = {
|
|
342
342
|
code: "VITE_ERROR",
|
|
343
343
|
id: moduleId,
|
|
344
344
|
stack: "",
|
|
345
345
|
...err
|
|
346
346
|
};
|
|
347
|
+
if (!errorData.frame && errorData.code === "PARSE_ERROR") {
|
|
348
|
+
errorData.frame = await node.transformModule(moduleId, "web").then(({ code }) => `${err.message || ""}
|
|
349
|
+
${code}`).catch(() => void 0);
|
|
350
|
+
}
|
|
347
351
|
throw createError({ data: errorData });
|
|
348
352
|
});
|
|
349
353
|
return module;
|
|
@@ -786,10 +790,25 @@ async function buildClient(ctx) {
|
|
|
786
790
|
}
|
|
787
791
|
|
|
788
792
|
async function writeManifest(ctx) {
|
|
793
|
+
const devClientManifest = {
|
|
794
|
+
"@vite/client": {
|
|
795
|
+
isEntry: true,
|
|
796
|
+
file: "@vite/client",
|
|
797
|
+
css: [],
|
|
798
|
+
module: true,
|
|
799
|
+
resourceType: "script"
|
|
800
|
+
},
|
|
801
|
+
[ctx.entry]: {
|
|
802
|
+
isEntry: true,
|
|
803
|
+
file: ctx.entry,
|
|
804
|
+
module: true,
|
|
805
|
+
resourceType: "script"
|
|
806
|
+
}
|
|
807
|
+
};
|
|
789
808
|
const clientDist = resolve$1(ctx.nuxt.options.buildDir, "dist/client");
|
|
790
809
|
const serverDist = resolve$1(ctx.nuxt.options.buildDir, "dist/server");
|
|
791
810
|
const manifestFile = resolve$1(clientDist, "manifest.json");
|
|
792
|
-
const clientManifest = JSON.parse(readFileSync(manifestFile, "utf-8"));
|
|
811
|
+
const clientManifest = ctx.nuxt.options.dev ? devClientManifest : JSON.parse(readFileSync(manifestFile, "utf-8"));
|
|
793
812
|
const buildAssetsDir = withTrailingSlash(withoutLeadingSlash(ctx.nuxt.options.app.buildAssetsDir));
|
|
794
813
|
const BASE_RE = new RegExp(`^${escapeRE(buildAssetsDir)}`);
|
|
795
814
|
for (const key in clientManifest) {
|
|
@@ -956,6 +975,7 @@ async function buildServer(ctx) {
|
|
|
956
975
|
return;
|
|
957
976
|
}
|
|
958
977
|
if (!ctx.nuxt.options.ssr) {
|
|
978
|
+
await writeManifest(ctx);
|
|
959
979
|
await onBuild();
|
|
960
980
|
return;
|
|
961
981
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/vite-builder-nightly",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-28724968.fefe4e5c",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.0.0-
|
|
24
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.0.0-28724968.fefe4e5c",
|
|
25
25
|
"@types/clear": "0.1.4",
|
|
26
26
|
"@types/estree": "1.0.5",
|
|
27
27
|
"rollup": "4.20.0",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"vue": "3.4.37"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.0.0-
|
|
32
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.0.0-28724968.fefe4e5c",
|
|
33
33
|
"@rollup/plugin-replace": "^5.0.7",
|
|
34
34
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
35
35
|
"@vitejs/plugin-vue-jsx": "^4.0.0",
|
|
36
36
|
"autoprefixer": "^10.4.20",
|
|
37
37
|
"clear": "^0.1.0",
|
|
38
38
|
"consola": "^3.2.3",
|
|
39
|
-
"cssnano": "^7.0.
|
|
39
|
+
"cssnano": "^7.0.5",
|
|
40
40
|
"defu": "^6.1.4",
|
|
41
41
|
"esbuild": "^0.23.0",
|
|
42
42
|
"escape-string-regexp": "^5.0.0",
|