@nuxt/bridge-edge 3.0.0-27328898.737f1bf → 3.0.0-27333287.f668d74

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.
@@ -438,7 +438,7 @@ const KeyPlugin = createUnplugin(() => {
438
438
  };
439
439
  });
440
440
 
441
- function setupCAPIBridge(_options) {
441
+ function setupCAPIBridge(options) {
442
442
  const nuxt = useNuxt();
443
443
  if (nuxt.options.buildModules.find((m) => m === "@nuxtjs/composition-api" || m === "@nuxtjs/composition-api/module")) {
444
444
  throw new Error("Please remove `@nuxtjs/composition-api` from `buildModules` to avoid conflict with bridge.");
@@ -460,6 +460,9 @@ function setupCAPIBridge(_options) {
460
460
  nuxt.hook("webpack:config", (configs) => {
461
461
  configs.forEach((config) => config.entry.app.unshift(capiPluginPath));
462
462
  });
463
+ if (options.legacy === false) {
464
+ return;
465
+ }
463
466
  nuxt.options.alias["@nuxtjs/composition-api"] = resolve(distDir$1, "runtime/capi.legacy.mjs");
464
467
  nuxt.options.build.transpile.push("@nuxtjs/composition-api", "@vue/composition-api");
465
468
  addPlugin(resolve(distDir$1, "runtime/capi.legacy.plugin.mjs"));
@@ -1024,7 +1027,7 @@ const module = defineNuxtModule({
1024
1027
  if (!opts.app) {
1025
1028
  throw new Error("[bridge] Cannot enable composition-api with app disabled!");
1026
1029
  }
1027
- await setupCAPIBridge(opts.capi);
1030
+ await setupCAPIBridge(opts.capi === true ? {} : opts.capi);
1028
1031
  }
1029
1032
  if (opts.scriptSetup) {
1030
1033
  await setupScriptSetup(opts.scriptSetup);
@@ -3,7 +3,7 @@ import { defineNuxtModule, addPluginTemplate } from '@nuxt/kit';
3
3
  import hash from 'hash-sum';
4
4
  import { resolve } from 'pathe';
5
5
 
6
- const version = "3.0.0-27328898.737f1bf";
6
+ const version = "3.0.0-27333287.f668d74";
7
7
 
8
8
  const middlewareTemplate = {
9
9
  filename: "middleware.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/bridge-edge",
3
- "version": "3.0.0-27328898.737f1bf",
3
+ "version": "3.0.0-27333287.f668d74",
4
4
  "repository": "nuxt/framework",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,10 +19,10 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@babel/plugin-transform-typescript": "^7.16.1",
22
- "@nuxt/kit": "npm:@nuxt/kit-edge@3.0.0-27328898.737f1bf",
23
- "@nuxt/nitro": "npm:@nuxt/nitro-edge@3.0.0-27328898.737f1bf",
22
+ "@nuxt/kit": "npm:@nuxt/kit-edge@3.0.0-27333287.f668d74",
23
+ "@nuxt/nitro": "npm:@nuxt/nitro-edge@3.0.0-27333287.f668d74",
24
24
  "@nuxt/postcss8": "^1.1.3",
25
- "@nuxt/schema": "npm:@nuxt/schema-edge@3.0.0-27328898.737f1bf",
25
+ "@nuxt/schema": "npm:@nuxt/schema-edge@3.0.0-27333287.f668d74",
26
26
  "@vitejs/plugin-legacy": "^1.6.4",
27
27
  "@vue/composition-api": "^1.4.1",
28
28
  "@vueuse/head": "^0.7.4",
@@ -42,7 +42,7 @@
42
42
  "mlly": "^0.3.15",
43
43
  "murmurhash-es": "^0.1.1",
44
44
  "node-fetch": "^3.1.0",
45
- "nuxi": "npm:nuxi-edge@3.0.0-27328898.737f1bf",
45
+ "nuxi": "npm:nuxi-edge@3.0.0-27333287.f668d74",
46
46
  "p-debounce": "^4.0.0",
47
47
  "pathe": "^0.2.0",
48
48
  "postcss": "^8",
package/types.d.ts CHANGED
@@ -9,7 +9,9 @@ export interface BridgeConfig {
9
9
  nitro: boolean
10
10
  vite: boolean
11
11
  app: boolean | {}
12
- capi: boolean | {}
12
+ capi: boolean | {
13
+ legacy?: boolean
14
+ }
13
15
  scriptSetup: boolean | ScriptSetupOptions
14
16
  autoImports: boolean
15
17
  transpile: boolean