Skip to content

Commit b41fb4c

Browse files
committed
revert workaround for #262 (comment)
1 parent d5b9edd commit b41fb4c

File tree

2 files changed

+12
-26
lines changed

2 files changed

+12
-26
lines changed

vite.config.ts

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { defineConfig } from 'vite';
44
import { svelte } from '@sveltejs/vite-plugin-svelte';
55
import inspect from 'vite-plugin-inspect';
6+
import path from 'path';
67

78
export default defineConfig({
89
plugins: [
@@ -12,4 +13,10 @@ export default defineConfig({
1213
build: true,
1314
}),
1415
],
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+
},
1522
});

vitest.workspace.ts

+5-26
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
import { defineWorkspace, mergeConfig } from 'vitest/config';
1+
import { defineWorkspace } from 'vitest/config';
22
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';
63

74
export default defineWorkspace([
85
{
96
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-
},
167
test: {
178
name: 'unit',
189
dir: './src/',
@@ -21,24 +12,12 @@ export default defineWorkspace([
2112
},
2213
},
2314
{
24-
// extends: './vite.config.ts', 👈 commented out
15+
extends: './vite.config.ts',
2516
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+
}),
3520
],
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-
},
4221
test: {
4322
name: 'storybook',
4423
browser: {

0 commit comments

Comments
 (0)