Skip to content

Commit ad5c030

Browse files
committed
nuxt+storybook integration workaround
1 parent b55d819 commit ad5c030

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

nuxt.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import process from 'node:process'
22
import { currentLocales } from './config/i18n'
33
import { isCI, provider } from 'std-env'
44

5+
const isStorybook = process.env.STORYBOOK === 'true' || process.env.VITEST_STORYBOOK === 'true'
6+
57
export default defineNuxtConfig({
68
modules: [
79
'@unocss/nuxt',
@@ -14,7 +16,7 @@ export default defineNuxtConfig({
1416
'@vite-pwa/nuxt',
1517
'@vueuse/nuxt',
1618
'@nuxtjs/i18n',
17-
'@nuxtjs/color-mode',
19+
isStorybook ? undefined : '@nuxtjs/color-mode',
1820
],
1921

2022
$test: {
@@ -157,9 +159,7 @@ export default defineNuxtConfig({
157159
},
158160

159161
experimental: {
160-
entryImportMap: false,
161-
typescriptPlugin: true,
162-
viteEnvironmentApi: true,
162+
viteEnvironmentApi: !isStorybook,
163163
typedPages: true,
164164
},
165165

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"test:types": "pnpm generate:lexicons && nuxt prepare && vue-tsc -b --noEmit && pnpm --filter npmx-connector test:types",
4848
"test:unit": "vite test --project unit",
4949
"start:playwright:webserver": "NODE_ENV=test pnpm preview --port 5678",
50-
"storybook": "storybook dev -p 6006",
51-
"build-storybook": "storybook build"
50+
"storybook": "STORYBOOK=true storybook dev -p 6006",
51+
"build-storybook": "STORYBOOK=true storybook build"
5252
},
5353
"dependencies": {
5454
"@atproto/common": "0.5.10",

0 commit comments

Comments
 (0)