Skip to content

fix(signals): drop assertInInjectionContext in production#4954

Merged
timdeschryver merged 1 commit intongrx:mainfrom
arturovt:refactor/tree-shake-assertInInjectionContext
Sep 9, 2025
Merged

fix(signals): drop assertInInjectionContext in production#4954
timdeschryver merged 1 commit intongrx:mainfrom
arturovt:refactor/tree-shake-assertInInjectionContext

Conversation

@arturovt
Copy link
Contributor

@arturovt arturovt commented Sep 8, 2025

Angular itself wraps assertInInjectionContext() (and similar helpers) in ngDevMode so that:

  • In dev builds → the assertion runs, catches mistakes early, and gives clear errors.
  • In prod builds → the code gets tree-shaken away, leaving no overhead.

@netlify
Copy link

netlify bot commented Sep 8, 2025

Deploy Preview for ngrx-site-v19 ready!

Name Link
🔨 Latest commit 63d62fd
🔍 Latest deploy log https://app.netlify.com/projects/ngrx-site-v19/deploys/68bece6a98a4740008fa6140
😎 Deploy Preview https://deploy-preview-4954--ngrx-site-v19.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Sep 8, 2025

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 63d62fd
🔍 Latest deploy log https://app.netlify.com/projects/ngrx-io/deploys/68bece6afea6cc0008401342

@markostanimirovic markostanimirovic changed the title fix(signals): drop assertInInjectionContext fix(signals): drop assertInInjectionContext in production Sep 8, 2025
@timdeschryver timdeschryver merged commit 37e6fa1 into ngrx:main Sep 9, 2025
8 checks passed
@arturovt arturovt deleted the refactor/tree-shake-assertInInjectionContext branch September 9, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants