-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
33 lines (32 loc) · 889 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { defineConfig } from 'vite'
import { VitePluginNode } from 'vite-plugin-node'
export default defineConfig({
plugins: [
...VitePluginNode({
appPath: './src/index.ts',
// eslint-disable-next-line @typescript-eslint/no-empty-function
adapter: () => {},
tsCompiler: 'swc',
swcOptions: {
jsc: {
parser: {
syntax: 'typescript',
},
target: 'es5',
},
},
}),
],
build: {
target: 'es5',
rollupOptions: {
treeshake: false,
output: {
inlineDynamicImports: true,
entryFileNames: '[name].js',
assetFileNames: '[name].ext',
format: 'cjs',
},
},
},
})