Multi-Page

Build several pages into separate bundles, set up two ways: as entries in lynx.config.ts, or as one Angular project per page in angular.json.

Entries in lynx.config.ts

  • source.entry — each key, main and settings, becomes its own bundle: main.lynx.bundle and settings.lynx.bundle.
  • A bootstrap file per page — src/main.ts and src/pages/settings/main.ts each call bootstrapApplication() with their own root component and config.
  • Independent apps — the pages share no router or state. The host app (Glossary) opens each bundle on its own.

Projects in angular.json

  • A project per page — angular.json defines home and settings application projects, each with its own browser entry file.
  • pages: 'all' — pluginAngularLynx({ pages: 'all' }) builds every application project as a page, with its bundle named after the project. Pass pages: ['home', 'settings'] to pick specific ones.
  • One build for every page — ng build home builds both pages.