1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 10:08:52 +08:00
Files
sqliteviz/vite.config.js
2025-03-09 21:57:36 +01:00

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'
}
}
}
})