2022-11-23 01:28:33 +00:00
|
|
|
import * as path from 'path'
|
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
2022-11-24 03:54:22 +00:00
|
|
|
import { nodePolyfills } from 'vite-plugin-node-polyfills'
|
2022-11-23 01:28:33 +00:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2022-11-24 03:54:22 +00:00
|
|
|
define: {
|
|
|
|
global: {},
|
|
|
|
},
|
2022-11-23 01:28:33 +00:00
|
|
|
resolve: {
|
2022-11-24 03:54:22 +00:00
|
|
|
alias: {
|
|
|
|
src: path.resolve(__dirname, 'src'),
|
|
|
|
}
|
2022-11-23 01:28:33 +00:00
|
|
|
},
|
2022-11-24 03:54:22 +00:00
|
|
|
plugins: [
|
|
|
|
nodePolyfills({
|
|
|
|
protocolImports: true,
|
|
|
|
}),
|
|
|
|
svelte({
|
|
|
|
onwarn: (warning, handler) => {
|
|
|
|
if (warning.code.startsWith("a11y-")) return
|
|
|
|
handler(warning)
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
2022-11-23 01:28:33 +00:00
|
|
|
})
|