mirror of
https://github.com/acid-info/Kurate.git
synced 2025-01-13 01:14:12 +00:00
30 lines
680 B
TypeScript
30 lines
680 B
TypeScript
import { sveltekit } from '@sveltejs/kit/vite'
|
|
import type { UserConfig } from 'vite'
|
|
import inject from '@rollup/plugin-inject'
|
|
import stdLibBrowser from 'node-stdlib-browser'
|
|
|
|
const config: UserConfig = {
|
|
plugins: [
|
|
sveltekit(),
|
|
{
|
|
...inject({
|
|
global: ['node-stdlib-browser/helpers/esbuild/shim', 'global'],
|
|
process: ['node-stdlib-browser/helpers/esbuild/shim', 'process'],
|
|
Buffer: ['node-stdlib-browser/helpers/esbuild/shim', 'Buffer'],
|
|
}),
|
|
enforce: 'post',
|
|
},
|
|
],
|
|
test: {
|
|
include: ['tests/unit/**/*.{test,spec}.{js,ts}'],
|
|
},
|
|
resolve: {
|
|
alias: stdLibBrowser,
|
|
},
|
|
optimizeDeps: {
|
|
include: ['buffer', 'process'],
|
|
},
|
|
}
|
|
|
|
export default config
|