2022-11-24 10:49:58 +01:00
|
|
|
import { sveltekit } from '@sveltejs/kit/vite'
|
|
|
|
import type { UserConfig } from 'vite'
|
2023-03-23 13:28:42 +01:00
|
|
|
import { nodePolyfills } from 'vite-plugin-node-polyfills'
|
2022-11-23 17:51:51 +01:00
|
|
|
|
|
|
|
const config: UserConfig = {
|
2023-01-24 07:51:42 +01:00
|
|
|
plugins: [
|
|
|
|
sveltekit(),
|
2023-03-23 13:28:42 +01:00
|
|
|
nodePolyfills({
|
|
|
|
// Whether to polyfill `node:` protocol imports.
|
|
|
|
protocolImports: true,
|
|
|
|
}),
|
2023-01-24 07:51:42 +01:00
|
|
|
],
|
2023-02-16 23:13:40 +01:00
|
|
|
test: {
|
|
|
|
include: ['tests/unit/**/*.{test,spec}.{js,ts}'],
|
|
|
|
},
|
2023-01-24 07:51:42 +01:00
|
|
|
optimizeDeps: {
|
|
|
|
include: ['buffer', 'process'],
|
2022-12-21 15:50:22 +01:00
|
|
|
},
|
2022-11-24 10:49:58 +01:00
|
|
|
}
|
2022-11-23 17:51:51 +01:00
|
|
|
|
2022-11-24 10:49:58 +01:00
|
|
|
export default config
|