/ packages / ui / vite.config.ts
vite.config.ts
 1  import { sveltekit } from '@sveltejs/kit/vite'
 2  import type { UserConfig } from 'vite'
 3  import { nodePolyfills } from 'vite-plugin-node-polyfills'
 4  
 5  const config: UserConfig = {
 6  	plugins: [
 7  		sveltekit(),
 8  		nodePolyfills({
 9  			// Whether to polyfill `node:` protocol imports.
10  			protocolImports: true,
11  		}),
12  	],
13  	test: {
14  		include: ['tests/unit/**/*.{test,spec}.{js,ts}'],
15  	},
16  	optimizeDeps: {
17  		include: ['buffer', 'process'],
18  	},
19  }
20  
21  export default config