-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
40 lines (39 loc) · 938 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
34
35
36
37
38
39
40
import { defineConfig } from 'vite';
import path from 'path';
import tsconfigPaths from 'vite-tsconfig-paths';
import dts from 'vite-plugin-dts';
export default defineConfig({
plugins: [tsconfigPaths(), dts()],
build: {
target: 'node18',
minify: false,
lib: {
entry: {
index: './src/index.ts',
cli: './src/cli.ts'
},
name: 'NueCMSCLI',
formats: ['es'],
fileName: (format, entryName) => `${entryName}.js`,
},
rollupOptions: {
external: [
'fs', 'path', 'url', 'util',
'commander', '@inquirer/prompts', 'prettier',
'mysql2/promise', 'dotenv', 'vite', 'sequelize', 'lodash'
],
output: {
dir: 'dist',
entryFileNames: '[name].js',
format: 'es'
}
},
sourcemap: false,
emptyOutDir: true
},
resolve: {
alias: {
'@commands': path.resolve(__dirname, 'src/commands')
}
}
});