@@ -2,7 +2,6 @@ import { resolve } from 'path';
22import { type ViteUserConfig , defineProject , mergeConfig } from 'vitest/config' ;
33import { svelte } from '@sveltejs/vite-plugin-svelte' ;
44import { svelteTesting } from '@testing-library/svelte/vite' ;
5- import { sveltePreprocess } from 'svelte-preprocess' ;
65import tsconfigPaths from 'vite-tsconfig-paths' ;
76import { developmentConfig } from '../../vite.common-development.config.js' ;
87import { getTreetopDistName } from '../../vite.common.config.js' ;
@@ -12,28 +11,14 @@ const dist = getTreetopDistName();
1211// https://vitejs.dev/config/
1312export default defineProject ( ( { mode } ) => {
1413 const commonConfig : ViteUserConfig = {
15- plugins : [
16- tsconfigPaths ( ) ,
17- svelte ( {
18- preprocess : sveltePreprocess ( ) ,
19- } ) ,
20- svelteTesting ( ) ,
21- ] ,
14+ plugins : [ tsconfigPaths ( ) , svelte ( ) , svelteTesting ( ) ] ,
2215 build : {
2316 outDir : resolve ( __dirname , '../../' , dist ) ,
2417 rollupOptions : {
2518 input : resolve ( __dirname , './options.html' ) ,
2619 } ,
2720 } ,
2821 test : {
29- // Work around onMount not being called when running tests
30- // https://github.com/vitest-dev/vitest/issues/2834#issuecomment-1439576110
31- alias : [
32- {
33- find : / ^ s v e l t e $ / ,
34- replacement : 'svelte/internal' ,
35- } ,
36- ] ,
3722 environment : 'jsdom' ,
3823 restoreMocks : true ,
3924 setupFiles : [
0 commit comments