-
Notifications
You must be signed in to change notification settings - Fork 12
/
vite.config.ts
38 lines (33 loc) · 887 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
import {defineConfig} from 'vite';
import banner from 'vite-plugin-banner';
import dts from 'vite-plugin-dts';
import {version} from './package.json';
const header = `/*! NanoPop ${version} MIT | https://github.com/Simonwep/nanopop */`;
export default defineConfig({
plugins: [
banner(header),
dts()
],
build: {
sourcemap: true,
minify: 'esbuild',
lib: {
entry: 'src/index.ts',
name: 'NanoPop',
fileName: 'nanopop'
}
},
server: {
port: 3005,
proxy: {
// Required for playwright to detect that the dev-server is running.
'^/$': {
target: `http://localhost:3005`,
rewrite: () => '/tests/_pages/container.html'
}
}
},
define: {
'VERSION': JSON.stringify(version)
}
});