From b4f5a7733e71bd6c5b44b4c4dc29807b0a36f4f6 Mon Sep 17 00:00:00 2001 From: chakAs3 Date: Sat, 17 Feb 2024 17:20:20 +0400 Subject: [PATCH] remove nuxt/entry call+0.2.3-alpha.4 --- packages/storybook-nuxt/package.json | 2 +- packages/storybook-nuxt/src/preview.ts | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/storybook-nuxt/package.json b/packages/storybook-nuxt/package.json index d28597b..7a590cd 100644 --- a/packages/storybook-nuxt/package.json +++ b/packages/storybook-nuxt/package.json @@ -1,6 +1,6 @@ { "name": "@storybook-vue/nuxt", - "version": "0.2.3-alpha.3", + "version": "0.2.3-alpha.4", "packageManager": "pnpm@8.6.12", "description": "Storybook for Nuxt and Vite: Develop Vue3 components in isolation with Hot Reloading.", "license": "MIT", diff --git a/packages/storybook-nuxt/src/preview.ts b/packages/storybook-nuxt/src/preview.ts index 166e290..2d8db5e 100644 --- a/packages/storybook-nuxt/src/preview.ts +++ b/packages/storybook-nuxt/src/preview.ts @@ -20,14 +20,7 @@ const globalWindow = window as any // entry() const logger = console -async function nuxtAppEntry() { - const nuxtApp = () => import('#app/entry').then(m => m.default).catch(() => {}) - // i - const vueAppPromise = nuxtApp().catch((_error) => { - // consola.error('Error while mounting app:', error) - }) - return vueAppPromise -} + async function applyNuxtPlugins(vueApp: any, storyContext: any) { const nuxt = createNuxtApp({ vueApp, globalName: `nuxt-${storyContext.id}` }) getContext('nuxt-app').set(nuxt, true) @@ -62,4 +55,4 @@ async function applyNuxtPlugins(vueApp: any, storyContext: any) { globalWindow.PLUGINS_SETUP_FUNCTIONS ||= new Set() globalWindow.PLUGINS_SETUP_FUNCTIONS.add(applyNuxtPlugins) -export default nuxtAppEntry +export default applyNuxtPlugins