Skip to content

fix(@ngtools/webpack): replace bootstrap code under Ivy unless running in JIT mode - #14180

Merged
alexeagle merged 3 commits into
angular:masterfrom
alan-agius4:ngtools-size-ivy
Apr 16, 2019
Merged

alexeagle merged 3 commits into
angular:masterfrom
alan-agius4:ngtools-size-ivy

Conversation

@alan-agius4

@alan-agius4 alan-agius4 commented Apr 16, 2019 •

Copy link
Copy Markdown
Collaborator

fix(@ngtools/webpack): replace bootstrap code under Ivy unless running in JIT mode

The bootstrap code always needs to be replaced if not running in JIT mode as other wise the entire compiler will be pulled in because we will not replace the bootstrapping code to use platform-browser instead of platform-browser-dynamic.

…g in JIT mode

The bootstrap code always needs to be replaced if not running in JIT mode as other wise the entire compiler will be pulled in because we will not replace the bootstrapping code to use `platform-browser` instead of `platform-browser-dynamic`.
: /bootstrapModuleFactory\([a-z]+\)\./;

const mainES2015 = readdirSync('./dist/test-project').find(name => !!name.match(/main-es2015.[a-z0-9]+\.js/));
expectFileToMatch(`dist/test-project/${mainES5}`, /bootstrapModuleFactory\(/);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This regexp was actually matching the entire contents of the bundle, and in fact this test was not failing for Ivy

@alan-agius4 alan-agius4 changed the title ngtools Ivy size regression fix fix(@ngtools/webpack): replace bootstrap code under Ivy unless running in JIT mode Apr 16, 2019
@alan-agius4 alan-agius4 added the target: major This PR is targeted for the next major release label Apr 16, 2019
@alexeagle
alexeagle merged commit 86b23d7 into angular:master Apr 16, 2019
@alan-agius4
alan-agius4 deleted the ngtools-size-ivy branch April 16, 2019 13:59
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants