feat: add resources
This commit is contained in:
@@ -15,6 +15,7 @@ if (true) {
|
||||
target: 'https://kevisual.silkyai.cn',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
cookieDomainRewrite: 'localhost',
|
||||
rewrite: (path) => path.replace(/^\/api/, '/api'),
|
||||
},
|
||||
'/api/router': {
|
||||
@@ -27,6 +28,7 @@ if (true) {
|
||||
'/user/login': {
|
||||
target: 'https://kevisual.silkyai.cn',
|
||||
changeOrigin: true,
|
||||
cookieDomainRewrite: 'localhost',
|
||||
rewrite: (path) => path.replace(/^\/user/, '/user'),
|
||||
},
|
||||
};
|
||||
@@ -41,12 +43,27 @@ export default defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
// 'react/jsx-dev-runtime': 'https://cdn.jsdelivr.net/npm/react/jsx-dev-runtime/+esm',
|
||||
// 'react/jsx-runtime': 'https://cdn.jsdelivr.net/npm/react/jsx-runtime/+esm',
|
||||
// 'react/jsx-runtime': path.resolve(__dirname, './node_modules/react/jsx-runtime'),
|
||||
// 'react/jsx-dev-runtime': path.resolve(__dirname, './node_modules/react/jsx-dev-runtime'),
|
||||
// 'react-dom/client': 'https://cdn.jsdelivr.net/npm/react-dom/client/+esm',
|
||||
// react: 'https://cdn.jsdelivr.net/npm/react@19.0.0/+esm',
|
||||
// 'react-dom': 'https://cdn.jsdelivr.net/npm/react-dom@19.0.0/+esm',
|
||||
|
||||
},
|
||||
},
|
||||
define: {
|
||||
DEV_SERVER: JSON.stringify(process.env.NODE_ENV === 'development'),
|
||||
BASE_NAME: JSON.stringify('/root/resources/'),
|
||||
},
|
||||
base: './',
|
||||
// base: isDev ? '/' : '/root/resources/',
|
||||
build: {
|
||||
rollupOptions: {
|
||||
// external: ['react', 'react-dom'],
|
||||
},
|
||||
},
|
||||
base: isDev ? '/' : '/root/resources/',
|
||||
server: {
|
||||
port: 6022,
|
||||
host: '0.0.0.0',
|
||||
@@ -59,6 +76,7 @@ export default defineConfig({
|
||||
target: 'http://localhost:4005',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
cookieDomainRewrite: 'localhost',
|
||||
rewrite: (path) => path.replace(/^\/api/, '/api'),
|
||||
},
|
||||
'/api/router': {
|
||||
@@ -68,12 +86,6 @@ export default defineConfig({
|
||||
rewriteWsOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '/api'),
|
||||
},
|
||||
'/api/s1/events': {
|
||||
target: 'https://kevisual.silkyai.cn',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '/api'),
|
||||
},
|
||||
...proxy,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user