-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.app.ts
53 lines (50 loc) · 1.33 KB
/
vite.config.app.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
50
51
52
53
import { sentryVitePlugin } from '@sentry/vite-plugin';
import react from '@vitejs/plugin-react';
import { visualizer } from 'rollup-plugin-visualizer';
import { defineConfig } from 'vite';
import { viteStaticCopy } from 'vite-plugin-static-copy';
import tsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
base: './',
build: {
outDir: 'dist/v1',
rollupOptions: {
input: {
app: './checkout.html',
},
},
sourcemap: true,
},
plugins: [
react(),
tsconfigPaths(),
viteStaticCopy({
targets: [
{
src: 'src/appConfig.json',
dest: './',
},
{
src: 'src/assets/*',
dest: './assets',
},
],
}),
visualizer(),
sentryVitePlugin({
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
telemetry: false,
}),
],
server: {
port: 7050,
proxy: {
'^/v1': {
target: 'http://localhost:7050',
rewrite: (path) => path.replace(/^\/v1/, ''),
},
},
},
});