-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
40 lines (38 loc) · 943 Bytes
/
vite.config.js
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 { resolve } from 'path';
import { defineConfig } from 'vite';
import basicSsl from '@vitejs/plugin-basic-ssl';
import solidPlugin from 'vite-plugin-solid';
import devtools from 'solid-devtools/vite'
import packageJson from './package.json';
export default defineConfig({
base: './',
server: {
port: 3030,
},
preview: {
port: 3031,
},
optimizeDeps: {
esbuildOptions: {
target: 'esnext', // you can also use 'es2020' here
},
},
plugins: [
devtools({ locator: true }),
solidPlugin(),
basicSsl(),
],
define: {
'__APP_VERSION__': JSON.stringify(packageJson.version),
},
build: {
target: 'esnext', // you can also use 'es2020' here
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/main.ts'),
name: 'Geotools',
// the proper extensions will be added
fileName: 'geotools',
},
},
});