File tree 2 files changed +12
-26
lines changed
2 files changed +12
-26
lines changed Original file line number Diff line number Diff line change 3
3
import { defineConfig } from 'vite' ;
4
4
import { svelte } from '@sveltejs/vite-plugin-svelte' ;
5
5
import inspect from 'vite-plugin-inspect' ;
6
+ import path from 'path' ;
6
7
7
8
export default defineConfig ( {
8
9
plugins : [
@@ -12,4 +13,10 @@ export default defineConfig({
12
13
build : true ,
13
14
} ) ,
14
15
] ,
16
+ resolve : {
17
+ alias : {
18
+ // This is already set up in svelte.config.js, but we need it explicitly here for vitest
19
+ $lib : path . resolve ( __dirname , 'src' ) ,
20
+ } ,
21
+ } ,
15
22
} ) ;
Original file line number Diff line number Diff line change 1
- import { defineWorkspace , mergeConfig } from 'vitest/config' ;
1
+ import { defineWorkspace } from 'vitest/config' ;
2
2
import { storybookTest } from '@storybook/experimental-addon-test/vitest-plugin' ;
3
- import path from 'path' ;
4
- import { svelte } from '@sveltejs/vite-plugin-svelte' ;
5
- import inspect from 'vite-plugin-inspect' ;
6
3
7
4
export default defineWorkspace ( [
8
5
{
9
6
extends : './vite.config.ts' ,
10
- resolve : {
11
- alias : {
12
- // This is already set up in svelte.config.js, but we need it explicitly here for vitest
13
- $lib : path . resolve ( __dirname , 'src' ) ,
14
- } ,
15
- } ,
16
7
test : {
17
8
name : 'unit' ,
18
9
dir : './src/' ,
@@ -21,24 +12,12 @@ export default defineWorkspace([
21
12
} ,
22
13
} ,
23
14
{
24
- // extends: './vite.config.ts', 👈 commented out
15
+ extends : './vite.config.ts' ,
25
16
plugins : [
26
- storybookTest ( {
27
- storybookScript : 'pnpm run storybook --no-open' ,
28
- } ) ,
29
- // 👆 BEFORE svelte plugin
30
- svelte ( ) ,
31
- inspect ( {
32
- dev : true ,
33
- build : true ,
34
- } ) ,
17
+ storybookTest ( {
18
+ storybookScript : 'pnpm run storybook --no-open' ,
19
+ } ) ,
35
20
] ,
36
- resolve : {
37
- alias : {
38
- // This is already set up in svelte.config.js, but we need it explicitly here for vitest
39
- $lib : path . resolve ( __dirname , 'src' ) ,
40
- } ,
41
- } ,
42
21
test : {
43
22
name : 'storybook' ,
44
23
browser : {
You can’t perform that action at this time.
0 commit comments