Skip to content

fix(platform-browser): resolve component resources before bootstrapping in JIT mode#62758

Closed
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:jit-resolve-resources
Closed

fix(platform-browser): resolve component resources before bootstrapping in JIT mode#62758
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:jit-resolve-resources

Conversation

@crisbeto
Copy link
Member

Currently if the app has some external resources and it gets bootstrapped in JIT mode, the user will get an error about calling resolveComponentResources. These changes add a call to resolveComponentResources automatically inside bootstrapApplication.

Note that we don't need similar logic for bootstrapModule, because it calls into compileNgModuleFactory internally which in turn calls resolveComponentResources.

@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Jul 23, 2025
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Jul 23, 2025
@ngbot ngbot bot added this to the Backlog milestone Jul 23, 2025
…ng in JIT mode

Currently if the app has some external resources and it gets bootstrapped in JIT mode, the user will get an error about calling `resolveComponentResources`. These changes add a call to `resolveComponentResources` automatically inside `bootstrapApplication`.

Note that we don't need similar logic for `bootstrapModule`, because it calls into `compileNgModuleFactory` internally which in turn calls `resolveComponentResources`.
@crisbeto crisbeto force-pushed the jit-resolve-resources branch from a7927b8 to 52e1bfa Compare July 23, 2025 07:58
@crisbeto crisbeto requested a review from devversion July 23, 2025 08:10
@crisbeto crisbeto marked this pull request as ready for review July 23, 2025 08:10
@crisbeto crisbeto added action: global presubmit The PR is in need of a google3 global presubmit action: merge The PR is ready for merge by the caretaker and removed action: global presubmit The PR is in need of a google3 global presubmit labels Jul 23, 2025
@crisbeto
Copy link
Member Author

Passing TGP

@kirjs
Copy link
Contributor

kirjs commented Jul 23, 2025

This PR was merged into the repository by commit 74d99ed.

The changes were merged into the following branches: main, 20.1.x

@kirjs kirjs closed this in 74d99ed Jul 23, 2025
kirjs pushed a commit that referenced this pull request Jul 23, 2025
…ng in JIT mode (#62758)

Currently if the app has some external resources and it gets bootstrapped in JIT mode, the user will get an error about calling `resolveComponentResources`. These changes add a call to `resolveComponentResources` automatically inside `bootstrapApplication`.

Note that we don't need similar logic for `bootstrapModule`, because it calls into `compileNgModuleFactory` internally which in turn calls `resolveComponentResources`.

PR Close #62758
crisbeto added a commit to crisbeto/angular that referenced this pull request Aug 8, 2025
In angular#62758 we started loading the component resources during bootstrap in JIT mode to ensure that they're in place by the time we create the component. This won't work for lazy-loaded components in the router, because they don't exist at bootstrap time.

These changes add similar logic when the router loads a component.
crisbeto added a commit to crisbeto/angular that referenced this pull request Aug 8, 2025
In angular#62758 we started loading the component resources during bootstrap in JIT mode to ensure that they're in place by the time we create the component. This won't work for lazy-loaded components in the router, because they don't exist at bootstrap time.

These changes add similar logic when the router loads a component.
crisbeto added a commit to crisbeto/angular that referenced this pull request Aug 8, 2025
In angular#62758 we started loading the component resources during bootstrap in JIT mode to ensure that they're in place by the time we create the component. This won't work for lazy-loaded components in the router, because they don't exist at bootstrap time.

These changes add similar logic when the router loads a component.
atscott pushed a commit that referenced this pull request Aug 8, 2025
In #62758 we started loading the component resources during bootstrap in JIT mode to ensure that they're in place by the time we create the component. This won't work for lazy-loaded components in the router, because they don't exist at bootstrap time.

These changes add similar logic when the router loads a component.

PR Close #63062
atscott pushed a commit that referenced this pull request Aug 8, 2025
In #62758 we started loading the component resources during bootstrap in JIT mode to ensure that they're in place by the time we create the component. This won't work for lazy-loaded components in the router, because they don't exist at bootstrap time.

These changes add similar logic when the router loads a component.

PR Close #63062
@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 Aug 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime hotlist: google target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants