mobile download
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const frontendRoot = path.resolve(__dirname, '../frontend/src');
|
||||
const sharedRoot = path.resolve(__dirname, '../packages/shared/src');
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
dedupe: ['react', 'react-dom', 'lightweight-charts'],
|
||||
alias: {
|
||||
'@goldenchart/shared': sharedRoot,
|
||||
'@frontend': frontendRoot,
|
||||
[path.resolve(frontendRoot, 'utils/backendApi.ts')]: path.resolve(sharedRoot, 'api/backendApi.ts'),
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['react', 'react-dom', '@stomp/stompjs', 'sockjs-client'],
|
||||
},
|
||||
server: {
|
||||
port: 5174,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
},
|
||||
'/upbit-api': {
|
||||
target: 'https://api.upbit.com',
|
||||
changeOrigin: true,
|
||||
rewrite: p => p.replace(/^\/upbit-api/, ''),
|
||||
},
|
||||
'/upbit-ws': {
|
||||
target: 'wss://api.upbit.com',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewrite: () => '/websocket/v1',
|
||||
},
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
sourcemap: true,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user