Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Multiple entryModule support #861

Closed
Closed

Description

@artonge

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

Area

- [x] devkit
- [ ] schematics

Versions

node version: v9.4.0
npm version: 5.6.0
Linux (Ubuntu 17.10)

Repro steps

Clone this example: https://github.com/artonge/multiple-entrymodules

The log given by the failure

At execution in the browser I have:
Uncaught Error: No NgModule metadata found for 'AppModule'.
This error only appears for the module that wasn't specified has the entryModule in the webpack config.

Desired functionality

At my company our webpack config has two entry points for two different apps, and generate two bundles for the two apps. The problem is that when using AOT, we can only specify one entryModule, but the two apps have different entryModule. It would be nice to specify two entryModules so the metadata are generated for both of them.

Activity

  1. james-criscuolo commented on May 7, 2018

    @james-criscuolo

    I am also running into this issue while upgrading. I used to be able to use the ngtools/webpack loader without the plugin, which allowed me to get around this issue. I would do this in development, then for production builds I would have the significantly longer build where I sent each entry point individually through webpack. Now I have no choice but to use the plugin in development, so my build process will suffer tremendously once I complete the upgrade.

  2. artonge commented on May 9, 2018

    @artonge
    Author

    Could this feature be backported to version 1.10.2 ? Any ETA ?
    Can a maintainer provide some indications to help me to add this feature ? Where should I look ? How to backport it ?

    When trying to install @ngtools/webpack dependencies with npm install, I have the following error:
    No matching version found for @angular-devkit/core@0.0.0

  3. artonge commented on May 15, 2018

    @artonge
    Author

    Duplicate of:

    @clydin could you help me comming with a solution ? I created a pull request #875 but some tests failed...

  4. filipesilva commented on May 24, 2018

    @filipesilva
    Contributor

    This is something we are interested it, but not for 6.x. We will re-evaluate when the Angular Ivy compiler is available as that changes how this feature would work.

  5. sherlock1982 commented on May 24, 2018

    @sherlock1982

    Could you please provide a kind of a workaround for this? Because I don't quite understand how can I code-split two endpoints in one app. Or for example how a custom element and an app can code-split angular.

  6. artonge commented on May 25, 2018

    @artonge
    Author

    Thanks for the answer @filipesilva ! As @sherlock1982 asked, could you provide some workaround ? Or tell us if my solution in #875 is safe to use ?

  7. alexeagle commented on Sep 4, 2018

    @alexeagle
    Contributor

    This issue was moved to angular/angular-cli#12107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions