mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 10:08:52 +08:00
41 lines
907 B
JavaScript
41 lines
907 B
JavaScript
import { fileURLToPath, URL } from 'node:url'
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { nodePolyfills } from 'vite-plugin-node-polyfills'
|
|
import { viteStaticCopy } from 'vite-plugin-static-copy'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
base: './',
|
|
plugins: [
|
|
vue(),
|
|
nodePolyfills({
|
|
include: ['process', 'util', 'stream', 'buffer'],
|
|
globals: { global: true, process: true },
|
|
}),
|
|
viteStaticCopy({
|
|
targets: [
|
|
{
|
|
src: 'LICENSE',
|
|
dest: './'
|
|
}
|
|
]
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
},
|
|
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
|
|
},
|
|
optimizeDeps: {
|
|
include:['sql.js'],
|
|
esbuildOptions: {
|
|
define: {
|
|
global: 'globalThis'
|
|
}
|
|
}
|
|
}
|
|
})
|
|
|