@nuxt/bridge-edge 3.0.0-28051135.ca0f5c5 → 3.0.0-28051151.e88ad64
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/chunks/vite.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { resolve, join, isAbsolute } from 'pathe';
|
|
|
2
2
|
import { logger, isIgnored } from '@nuxt/kit';
|
|
3
3
|
import { findExports, sanitizeFilePath } from 'mlly';
|
|
4
4
|
import { joinURL, withoutLeadingSlash, withTrailingSlash } from 'ufo';
|
|
5
|
-
import { i as isCSS, p as prepareManifests, h as hashId, u as uniq, g as generateDevSSRManifest, d as distDir, a as pkgDir } from '../shared/bridge-edge.
|
|
5
|
+
import { i as isCSS, p as prepareManifests, h as hashId, u as uniq, g as generateDevSSRManifest, d as distDir, a as pkgDir } from '../shared/bridge-edge.b4355501.mjs';
|
|
6
6
|
import createVuePlugin from '@vitejs/plugin-vue2';
|
|
7
7
|
import { getPort } from 'get-port-please';
|
|
8
8
|
import { defineEventHandler } from 'h3';
|
package/dist/module.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { defu } from "defu";
|
|
|
2
2
|
import { computed, getCurrentInstance as getVM, isReactive, isRef, onBeforeMount, onServerPrefetch, reactive, ref, set, shallowRef, toRaw, toRefs, watch } from "vue";
|
|
3
3
|
import { useNuxtApp } from "./app.mjs";
|
|
4
4
|
import { useRouter as _useRouter, useRoute as _useRoute, useState } from "./composables.mjs";
|
|
5
|
+
import { isFullStatic } from "#build/composition-globals.mjs";
|
|
5
6
|
export {
|
|
6
7
|
computed,
|
|
7
8
|
customRef,
|
|
@@ -415,7 +416,7 @@ export const useFetch = (callback) => {
|
|
|
415
416
|
vm.$fetch = callFetches.bind(vm);
|
|
416
417
|
onBeforeMount(() => !vm._hydrated && callFetches.call(vm));
|
|
417
418
|
if (process.server || !isSsrHydration(vm)) {
|
|
418
|
-
if (process.client &&
|
|
419
|
+
if (process.client && isFullStatic) {
|
|
419
420
|
loadFullStatic(vm);
|
|
420
421
|
}
|
|
421
422
|
return result();
|
|
@@ -701,6 +701,17 @@ async function setupAppBridge(_options) {
|
|
|
701
701
|
nuxt.hook("prepare:types", ({ references }) => {
|
|
702
702
|
references.push({ path: resolve(nuxt.options.buildDir, "types/schema.d.ts") });
|
|
703
703
|
});
|
|
704
|
+
addTemplate({
|
|
705
|
+
filename: "composition-globals.mjs",
|
|
706
|
+
getContents: () => {
|
|
707
|
+
const globals = {
|
|
708
|
+
// useFetch
|
|
709
|
+
isFullStatic: !nuxt.options.dev && !nuxt.options._legacyGenerate && nuxt.options.target === "static" && nuxt.options.render?.ssr
|
|
710
|
+
};
|
|
711
|
+
const contents = Object.entries(globals).map(([key, value]) => `export const ${key} = ${JSON.stringify(value)}`).join("\n");
|
|
712
|
+
return contents;
|
|
713
|
+
}
|
|
714
|
+
});
|
|
704
715
|
const { dst: vueCompat } = addTemplate({ src: resolve(distDir, "runtime/vue2-bridge.mjs") });
|
|
705
716
|
addWebpackPlugin(VueCompat.webpack({ src: vueCompat }));
|
|
706
717
|
addVitePlugin(VueCompat.vite({ src: vueCompat }));
|
package/module.cjs
CHANGED
|
@@ -16,6 +16,9 @@ module.exports.defineNuxtConfig = (config = {}) => {
|
|
|
16
16
|
// Initialize typescript config for nuxi typecheck + prepare support
|
|
17
17
|
config.typescript = config.typescript || {}
|
|
18
18
|
|
|
19
|
+
// Initialize nitro options
|
|
20
|
+
config.nitro = config.nitro || {}
|
|
21
|
+
|
|
19
22
|
// Nuxt kit depends on this flag to check bridge compatibility
|
|
20
23
|
config.bridge = typeof config.bridge === 'object' ? config.bridge : {}
|
|
21
24
|
config.bridge._version = pkg.version
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/bridge-edge",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-28051151.e88ad64",
|
|
4
4
|
"repository": "nuxt/bridge",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
|
20
20
|
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
21
21
|
"@babel/plugin-transform-typescript": "^7.21.3",
|
|
22
|
-
"@nuxt/bridge-schema": "npm:@nuxt/bridge-schema-edge@3.0.0-
|
|
22
|
+
"@nuxt/bridge-schema": "npm:@nuxt/bridge-schema-edge@3.0.0-28051151.e88ad64",
|
|
23
23
|
"@nuxt/devalue": "^2.0.2",
|
|
24
24
|
"@nuxt/kit": "3.4.3",
|
|
25
25
|
"@nuxt/postcss8": "^1.1.3",
|