checkout/vite.config.app.ts

54 lines
1.3 KiB
TypeScript
Raw Normal View History

import { sentryVitePlugin } from '@sentry/vite-plugin';
2023-07-31 12:13:49 +00:00
import react from '@vitejs/plugin-react';
2023-09-05 12:06:55 +00:00
import { visualizer } from 'rollup-plugin-visualizer';
import { defineConfig } from 'vite';
2023-07-31 12:13:49 +00:00
import { viteStaticCopy } from 'vite-plugin-static-copy';
import tsconfigPaths from 'vite-tsconfig-paths';
2023-07-31 12:13:49 +00:00
export default defineConfig({
base: './',
build: {
outDir: 'dist/v1',
2023-07-31 12:13:49 +00:00
rollupOptions: {
input: {
app: './checkout.html',
},
},
sourcemap: true,
2023-07-31 12:13:49 +00:00
},
plugins: [
react(),
tsconfigPaths(),
viteStaticCopy({
targets: [
{
src: 'src/appConfig.json',
dest: './',
2023-07-31 12:13:49 +00:00
},
{
src: 'src/assets/*',
dest: './assets',
2023-07-31 12:13:49 +00:00
},
],
}),
2023-09-05 12:06:55 +00:00
visualizer(),
sentryVitePlugin({
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
2024-07-24 12:19:06 +00:00
authToken: process.env.SENTRY_AUTH_TOKEN,
telemetry: false,
}),
2023-07-31 12:13:49 +00:00
],
server: {
port: 7050,
proxy: {
'^/v1': {
target: 'http://localhost:7050',
rewrite: (path) => path.replace(/^\/v1/, ''),
},
},
},
2023-07-31 12:13:49 +00:00
});