aquavox/packages/web/vite.config.js
alikia2x c1bfba8f1c
ref: delete electron package & backend
update: docker

Support for the Electron version will be delayed. We don't need it for now.
2024-12-23 02:05:49 +08:00

44 lines
1.0 KiB
JavaScript

import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill';
import rollupNodePolyFill from 'rollup-plugin-node-polyfills';
import wasm from 'vite-plugin-wasm';
import path from 'node:path';
export default defineConfig({
resolve: {
alias: {
'@core': path.resolve(__dirname, '../../packages/core'),
}
},
plugins: [sveltekit(), wasm()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
},
preview: {
port: 4173,
},
optimizeDeps: {
esbuildOptions: {
define: {
global: 'globalThis'
},
plugins: [
NodeGlobalsPolyfillPlugin({
buffer: true
})
]
}
},
build: {
rollupOptions: {
plugins: [rollupNodePolyFill()]
}
},
server: {
fs: {
allow: ['./package.json']
}
}
});