Files
flights_web/module-federation.config.ts
gnezim 7ec76486ec Clean up build warnings: MF DTS, autoprefixer color-adjust, dev CORS
Three non-fatal warnings surfaced by the Jenkins build log, fixed in
the config layer:

- module-federation.config.ts: dts: false. The @module-federation/
  dts-plugin fails under our strict tsconfig and logs TYPE-001 every
  build. Remote types are not needed at runtime; consumers generate
  their own via their dev toolchain.

- src/styles/_layout.scss: color-adjust → print-color-adjust. The
  unprefixed color-adjust shorthand is deprecated; the standard name
  is print-color-adjust. Matches the -webkit- prefixed sibling.

- modern.config.ts: tools.devServer.headers explicitly set. MF warns
  when devServer.headers is empty and auto-assigns '*'. Providing an
  explicit allowlist silences the banner in dev builds; production
  behavior is unaffected (real reverse proxy manages CORS).
2026-04-17 18:11:04 +03:00

22 lines
892 B
TypeScript

import { createModuleFederationConfig } from "@module-federation/modern-js";
export default createModuleFederationConfig({
name: "aeroflot_flights",
exposes: {
"./OnlineBoard": "./src/mf/expose/OnlineBoard.tsx",
"./Schedule": "./src/mf/expose/Schedule.tsx",
"./FlightsMap": "./src/mf/expose/FlightsMap.tsx",
"./PopularRequests": "./src/mf/expose/PopularRequests.tsx",
},
shared: {
react: { singleton: true, requiredVersion: "^18.2.0" },
"react-dom": { singleton: true, requiredVersion: "^18.2.0" },
},
// Disable DTS generation at build time. @module-federation/dts-plugin@2.3.3
// fails against our strict tsconfig (exactOptionalPropertyTypes +
// noUncheckedIndexedAccess) and logs a TYPE-001 error. Types for the
// exposed modules are shipped to consumers via their own dev-time
// toolchain; the runtime does not need them.
dts: false,
});