Skip to content

Commit

Permalink
refactor: remove unused Vue alias and cleanup Nuxt app creation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
chakAs3 committed Dec 27, 2024
1 parent 11908e4 commit bc665ef
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions packages/storybook-addon/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,6 @@ function mergeViteConfig(
'import.meta.client': 'true',
},

resolve: {
alias: {
vue: 'vue/dist/vue.esm-bundler.js',
},
},

plugins: [
replace({
values: {
Expand Down
6 changes: 0 additions & 6 deletions packages/storybook-addon/src/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ setup(async (vueApp, storyContext) => {
// Create a new nuxt app for each story
const storyNuxtAppId = `nuxt-app-${key}`
const storyNuxtCtx = getContext(storyNuxtAppId)
if (storyNuxtCtx.tryUse()) {
// Nothing to do, the Nuxt app is already created
// We still have to recreate the Nuxt app for each story because Storybook recreates the Vue app every time
// TODO : Maybe we should destroy the Nuxt app when the Vue app is destroyed, if it is not the case already ?
// return
}

// Provide the config of the Nuxt app
// @ts-expect-error internal Nuxt property
Expand Down

0 comments on commit bc665ef

Please sign in to comment.