mirror of
https://github.com/coracle-social/coracle.git
synced 2024-10-06 11:43:30 +00:00
32 lines
701 B
JavaScript
32 lines
701 B
JavaScript
import * as path from 'path'
|
|
import { defineConfig } from 'vite'
|
|
import sveltePreprocess from 'svelte-preprocess'
|
|
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
|
import { nodePolyfills } from 'vite-plugin-node-polyfills'
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
sourcemap: true,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
src: path.resolve(__dirname, 'src'),
|
|
}
|
|
},
|
|
plugins: [
|
|
nodePolyfills({
|
|
protocolImports: true,
|
|
}),
|
|
svelte({
|
|
preprocess: sveltePreprocess(),
|
|
onwarn: (warning, handler) => {
|
|
|
|
if (warning.code.startsWith('a11y-')) return
|
|
if (warning.filename.includes("node_modules")) return
|
|
|
|
handler(warning)
|
|
},
|
|
}),
|
|
],
|
|
})
|