-
Notifications
You must be signed in to change notification settings - Fork 3
/
vite.config.ts
49 lines (48 loc) · 1.44 KB
/
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
41
42
43
44
45
46
47
48
49
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
import path from 'node:path';
export default defineConfig({
plugins: [solidPlugin()],
base: './',
build: {
target: 'esnext',
outDir: path.resolve(__dirname, './dist'),
lib: {
entry: path.resolve(__dirname, './src/components/index.tsx'),
name: 'CUI'
},
rollupOptions: {
context: 'globalThis',
preserveEntrySignatures: 'strict',
external: ['solid-js', 'solid-js/web', 'solid-js/store', 'countup.js', 'tinycolor2', 'cui-virtual-list', 'dayjs'],
output: [
{
format: 'es',
exports: 'named',
sourcemap: false,
entryFileNames: 'cui.min.esm.js',
chunkFileNames: '[name].js',
assetFileNames: '[name].[ext]',
inlineDynamicImports: false,
manualChunks: undefined,
}
]
}
},
resolve: {
conditions: ['development', 'browser'],
alias: {
// 'solid-vue-router': path.resolve('./src/solid-router'),
'@': path.resolve('./src')
}
},
server: {
port: 5173,
host: '0.0.0.0',
proxy: {
'/test': {
target: 'http://localhost:18080/'
},
}
},
});