Skip to content

feat(@ngtools/webpack): replace bootstrap code for server apps #8951

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

Merged
merged 1 commit into from
Jan 9, 2018

Conversation

FrozenPandaz
Copy link
Contributor

This fixes an issue affecting people who are using AngularCompilerPlugin outside of the CLI

Example Repo:

https://github.com/FrozenPandaz/ng-universal-demo/tree/compilerplugin

npm run build:prod
npm run server

Error without Fix:

Error: No NgModule metadata found for 'ServerAppModule'.
    at NgModuleResolver.resolve (/home/jason/projects/ng-universal-demo/dist/server.js:60055:23)
    at CompileMetadataResolver.getNgModuleMetadata (/home/jason/projects/ng-universal-demo/dist/server.js:55024:60)
    at JitCompiler._loadModules (/home/jason/projects/ng-universal-demo/dist/server.js:74075:87)
    at JitCompiler._compileModuleAndComponents (/home/jason/projects/ng-universal-demo/dist/server.js:74036:36)
    at JitCompiler.compileModuleAsync (/home/jason/projects/ng-universal-demo/dist/server.js:73930:37)
    at CompilerImpl.compileModuleAsync (/home/jason/projects/ng-universal-demo/dist/server.js:144994:49)
    at PlatformRef.bootstrapModule (/home/jason/projects/ng-universal-demo/dist/server.js:7981:25)
    at Object.<anonymous> (/home/jason/projects/ng-universal-demo/dist/server.js:110213:91)
    at __webpack_require__ (/home/jason/projects/ng-universal-demo/dist/server.js:20:30)
    at /home/jason/projects/ng-universal-demo/dist/server.js:63:18

@FrozenPandaz FrozenPandaz force-pushed the replace-server-bootstrap branch from 35c690b to 727b1aa Compare December 21, 2017 01:59
Copy link
Contributor

@filipesilva filipesilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with the transform itself. @Brocco can you review platform-server usage cases?

Copy link
Contributor

@Brocco Brocco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@clydin clydin merged commit aa90e42 into angular:master Jan 9, 2018
@odahcam
Copy link

odahcam commented Jan 22, 2018

Does it got published in any Angular version? We that are using MarkPieszak/aspnetcore-angular2-universal still with problems in ordinary angular@~5.0.0 configs. :/

@FrozenPandaz FrozenPandaz deleted the replace-server-bootstrap branch January 22, 2018 15:45
@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.

6 participants