checkout/vite.config.app.ts

50 lines
1.2 KiB
TypeScript
Raw Normal View History

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 svgr from 'vite-plugin-svgr';
import tsconfigPaths from 'vite-tsconfig-paths';
2023-07-31 12:13:49 +00:00
export default defineConfig({
base: './',
build: {
outDir: 'dist/v1',
rollupOptions: {
input: {
app: './checkout.html',
},
},
2023-07-31 12:13:49 +00:00
},
plugins: [
react(),
svgr(),
tsconfigPaths(),
viteStaticCopy({
targets: [
{
src: 'src/appConfig.json',
dest: './',
2023-07-31 12:13:49 +00:00
},
{
src: 'src/env.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(),
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
});