setup(frontend): rename frontend-react
This commit is contained in:
25
frontend-react/modern.config.ts
Normal file
25
frontend-react/modern.config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { URL } from 'url';
|
||||
import { appTools, defineConfig } from '@modern-js/app-tools';
|
||||
|
||||
const apiBase = new URL(process.env.API_BASE || 'http://localhost:8000');
|
||||
|
||||
// https://modernjs.dev/en/configure/app/usage
|
||||
export default defineConfig({
|
||||
bff: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: apiBase.origin,
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^/api': apiBase.pathname },
|
||||
},
|
||||
},
|
||||
},
|
||||
runtime: {
|
||||
router: true,
|
||||
},
|
||||
plugins: [
|
||||
appTools({
|
||||
bundler: 'experimental-rspack',
|
||||
}),
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user