Skip to content

WIP: Add angular-cli.json option to explicitly specify entryModule when … #4077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

tsabirgaliev
Copy link
Contributor

…it can’t be inferred from code

In some cases @ngtools/webpack is unable to resolve the application entry module automatically.
This commit exposes entryModule option of AotPlugin in angular-cli.json so that you can specify it by hand.

…it can’t be inferred from code

In some cases `@ngtools/webpack` is unable to resolve the application entry module automatically.
This commit exposes `entryModule` option of `AotPlugin` in angular-cli.json so that you can specify it by hand.
@tsabirgaliev tsabirgaliev changed the title Add angular-cli.json option to explicitly specify entryModule when … WIP: Add angular-cli.json option to explicitly specify entryModule when … Jan 17, 2017
@filipesilva filipesilva requested a review from hansl January 17, 2017 23:05
@tsabirgaliev
Copy link
Contributor Author

Please @hansl @filipesilva can you point me in right direction with appveyor failure? can't reproduce it on my machine :(

@tsabirgaliev
Copy link
Contributor Author

tsabirgaliev commented Jan 21, 2017

And also please suggest a proper place and way to cover the changes with tests

@filipesilva
Copy link
Contributor

@hansl is the appropriate person to review this PR.

Meanwhile though, can you provide a test case that would break without this enhancement?

Regarding appveyor, I think it was having some trouble a bit ago. It shouldn't be relevant to your PR atm.

@tsabirgaliev
Copy link
Contributor Author

tsabirgaliev commented Jan 21, 2017

@filipesilva I have the following test case, just can't figure out how and where to properly incorporate it into the test suite:

if (someCondition) {
  platformBrowserDynamic().bootstrapModule(AppModule, { providers }).catch((reason) => {
    console.error(reason);
  });
} else {
  platformBrowserDynamic().bootstrapModule(AppModule).catch((reason) => {
    console.error(reason);
  });
}

I know this is somewhat contrived example, it is just to show the static resolver is not 100% bulletproof.
Probably, this can be further reduced to a minimal case, that breaks resolution, I just don't know enough internals to do it.

@tsabirgaliev
Copy link
Contributor Author

#2887 (comment) -- the workaround suggested in this comment also breaks resolution

@hansl
Copy link
Contributor

hansl commented Feb 15, 2017

This is a use case we need to fix, rather than work around. I'll take a look at it.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants