Skip to content

Commit

Permalink
remove nuxt/entry call+0.2.3-alpha.4
Browse files Browse the repository at this point in the history
  • Loading branch information
chakAs3 committed Feb 17, 2024
1 parent a06c5b7 commit b4f5a77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/storybook-nuxt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook-vue/nuxt",
"version": "0.2.3-alpha.3",
"version": "0.2.3-alpha.4",
"packageManager": "[email protected]",
"description": "Storybook for Nuxt and Vite: Develop Vue3 components in isolation with Hot Reloading.",
"license": "MIT",
Expand Down
11 changes: 2 additions & 9 deletions packages/storybook-nuxt/src/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

0 comments on commit b4f5a77

Please sign in to comment.