mirror of
https://github.com/Gimanh/taskview-community.git
synced 2026-09-11 21:38:56 +00:00
42 lines
1009 B
TypeScript
42 lines
1009 B
TypeScript
import { defineConfig } from 'vite';
|
|
import { VitePluginNode } from 'vite-plugin-node';
|
|
|
|
export default defineConfig({
|
|
server: {
|
|
port: 1401,
|
|
},
|
|
plugins: [
|
|
...VitePluginNode({
|
|
adapter: 'express',
|
|
appPath: './server.ts',
|
|
}),
|
|
],
|
|
ssr: {
|
|
noExternal: true,
|
|
},
|
|
esbuild: {
|
|
target: 'es2021',
|
|
},
|
|
build: {
|
|
target: "es2021",
|
|
minify: 'terser',
|
|
terserOptions: {
|
|
ecma: 2015,
|
|
compress: true,
|
|
mangle: {
|
|
properties: false,//couse error if true after build
|
|
},
|
|
format: {
|
|
comments: true,
|
|
},
|
|
},
|
|
rollupOptions: {
|
|
output: {
|
|
format: 'umd',
|
|
entryFileNames: 'taskview-server.js',
|
|
chunkFileNames: 'taskview-server-[hash].js',
|
|
assetFileNames: 'taskview-server-[name]-[hash].[ext]',
|
|
},
|
|
},
|
|
},
|
|
}); |