coracle/vite.config.js

32 lines
701 B
JavaScript
Raw Normal View History

2022-11-23 01:28:33 +00:00
import * as path from 'path'
import { defineConfig } from 'vite'
2023-02-03 23:01:29 +00:00
import sveltePreprocess from 'svelte-preprocess'
2022-11-23 01:28:33 +00:00
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
2022-11-23 01:28:33 +00:00
export default defineConfig({
2022-12-06 05:46:40 +00:00
build: {
sourcemap: true,
},
2022-11-23 01:28:33 +00:00
resolve: {
alias: {
src: path.resolve(__dirname, 'src'),
}
2022-11-23 01:28:33 +00:00
},
plugins: [
nodePolyfills({
protocolImports: true,
}),
svelte({
2023-02-03 23:01:29 +00:00
preprocess: sveltePreprocess(),
onwarn: (warning, handler) => {
2023-02-03 23:01:29 +00:00
2023-02-06 21:09:08 +00:00
if (warning.code.startsWith('a11y-')) return
2023-02-03 23:01:29 +00:00
if (warning.filename.includes("node_modules")) return
handler(warning)
},
}),
],
2022-11-23 01:28:33 +00:00
})