Files
flights_web/modern.config.ts
T
gnezim f61e050e8c Configure dev proxy to flights.test.aeroflot.ru and fix API endpoint paths
API functions now build the full localized path matching the Angular
EndpointService pattern (/api/flights/{version}/{locale}/{endpoint}).
The dev proxy forwards /api and /flights to the test backend.
2026-04-15 21:32:28 +03:00

35 lines
764 B
TypeScript

import { appTools, defineConfig } from "@modern-js/app-tools";
import { moduleFederationPlugin } from "@module-federation/modern-js";
const buildTarget = process.env["BUILD_TARGET"];
const isRemote = buildTarget === "remote";
export default defineConfig({
plugins: [appTools({ bundler: "rspack" }), moduleFederationPlugin()],
source: {
entriesDir: "./src",
},
runtime: {
router: true,
},
dev: {
proxy: {
"/api": "https://flights.test.aeroflot.ru/api",
"/flights": "https://flights.test.aeroflot.ru/flights",
},
},
server: {
ssr: {
mode: "stream",
},
},
output: {
distPath: { root: isRemote ? "dist/remote" : "dist/standalone" },
},
tools: {
cssLoader: {
url: false,
},
},
});