Files
flights_web/modern.config.ts
T
gnezim e7c20c3d2d
CI / ci (push) Failing after 36s
Deploy / build-and-deploy (push) Failing after 5s
Fix API integration: proxy via Angular, date format, root redirect
- Point API_BASE_URL to localhost:4200 (Angular's dev proxy) which
  correctly forwards to flights.test.aeroflot.ru with proper headers
- Convert URL date format (yyyyMMdd) to API format (yyyy-MM-ddT00:00:00)
  matching Angular's ApiFormatterService behavior
- Add standalone api-proxy.mjs script for running without Angular
- Root page redirect uses both loader and client-side navigate
- SignalR hub URL points to platform.yc.webzavod.ru/tracker/hub
- Remove broken server/modern-js.server.ts (proxy handled externally)
2026-04-15 22:08:54 +03:00

29 lines
614 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,
},
server: {
ssr: {
mode: "stream",
},
},
tools: {
cssLoader: {
url: false,
},
},
output: {
distPath: { root: isRemote ? "dist/remote" : "dist/standalone" },
},
});