Skip to content

Commit 841b5c2

Browse files
committed
chore: optimize test deps
1 parent d8e4591 commit 841b5c2

File tree

1 file changed

+30
-11
lines changed

1 file changed

+30
-11
lines changed

second-gen/packages/swc/vitest.config.js

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
1313
import { defineConfig } from 'vitest/config';
1414

1515
export default defineConfig({
16-
// optimizeDeps: {
17-
// exclude: [
18-
// 'playwright',
19-
// 'playwright-core',
20-
// '@playwright/test',
21-
// 'storybook',
22-
// '@storybook/addon-vitest',
23-
// 'fs',
24-
// 'crypto',
25-
// ],
26-
// },
16+
optimizeDeps: {
17+
exclude: [
18+
'playwright',
19+
'playwright-core',
20+
'@playwright/test',
21+
'storybook',
22+
'@storybook/addon-vitest',
23+
'fs',
24+
'crypto',
25+
],
26+
},
2727
test: {
2828
// Default test configuration
2929
browser: {
@@ -74,6 +74,25 @@ export default defineConfig({
7474
// See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
7575
storybookTest(),
7676
],
77+
define: {
78+
global: 'globalThis',
79+
process: {
80+
env: {},
81+
},
82+
},
83+
optimizeDeps: {
84+
exclude: [
85+
'playwright',
86+
'playwright-core',
87+
'@playwright/test',
88+
'storybook',
89+
'@storybook/addon-vitest',
90+
'fs',
91+
'crypto',
92+
'path',
93+
'os',
94+
],
95+
},
7796
test: {
7897
name: 'storybook',
7998
browser: {

0 commit comments

Comments
 (0)