Skip to content

Commit 3549bf9

Browse files
authored
fix: patch Nuxt for __buildAssetsURL is not defined (#1024)
Apply nuxt/nuxt#34607 to our old version of Nuxt to give us some time to catch up the latest minor.
1 parent 84611cf commit 3549bf9

File tree

3 files changed

+52
-28
lines changed

3 files changed

+52
-28
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
"core-js",
2525
"unrs-resolver",
2626
"vue-demi"
27-
]
27+
],
28+
"patchedDependencies": {
29+
"nuxt": "patches/nuxt.patch"
30+
}
2831
},
2932
"scripts": {
3033
"lint": "eslint .",

patches/nuxt.patch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/dist/core/runtime/nitro/utils/renderer/build-files.js b/dist/core/runtime/nitro/utils/renderer/build-files.js
2+
index 22c29a7f3bf2b890ed4d0d04fe46fcd56f2845c3..6f7b161844b819565c163427ab95f8bbc0d73d00 100644
3+
--- a/dist/core/runtime/nitro/utils/renderer/build-files.js
4+
+++ b/dist/core/runtime/nitro/utils/renderer/build-files.js
5+
@@ -5,7 +5,9 @@ import { renderToString as _renderToString } from "vue/server-renderer";
6+
import { propsToString } from "@unhead/vue/server";
7+
import { useRuntimeConfig } from "#internal/nitro";
8+
import { appRootAttrs, appRootTag, appSpaLoaderAttrs, appSpaLoaderTag, spaLoadingTemplateOutside } from "#internal/nuxt.config.mjs";
9+
-import { buildAssetsURL } from "#internal/nuxt/paths";
10+
+import { buildAssetsURL, publicAssetsURL } from "#internal/nuxt/paths";
11+
+globalThis.__buildAssetsURL = buildAssetsURL;
12+
+globalThis.__publicAssetsURL = publicAssetsURL;
13+
const APP_ROOT_OPEN_TAG = `<${appRootTag}${propsToString(appRootAttrs)}>`;
14+
const APP_ROOT_CLOSE_TAG = `</${appRootTag}>`;
15+
const getServerEntry = () => import("#build/dist/server/server.mjs").then((r) => r.default || r);

0 commit comments

Comments
 (0)