fix(dts-plugin): do not regen types on hmr if dev false#3223
fix(dts-plugin): do not regen types on hmr if dev false#3223ScriptedAlchemy merged 2 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 710e92c The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
6acb9e5 to
e9fd573
Compare
There was a problem hiding this comment.
Summary
Here is a concise summary of the pull request:
The key changes in this pull request optimize the behavior of the dts-plugin when the dev option is set to false. Specifically, the changes ensure that types are only generated on the initial build and not during subsequent Hot Module Replacement (HMR) updates. This optimization improves the overall build performance by avoiding unnecessary type regeneration. The changes are focused on the GenerateTypesPlugin.ts file and are intended to address an existing issue (#3110) related to type generation during HMR.
File Summaries
| File | Summary |
|---|---|
| packages/dts-plugin/src/plugins/GenerateTypesPlugin.ts | The code changes introduce a new condition to skip regenerating types during Hot Module Replacement (HMR) when the dev option is set to false. This optimization ensures that types are only generated on the initial build and not on subsequent HMR updates, improving the overall build performance. |
|
Going to have user test the Canary before I merge |
Description
when
dev:falseonly generate types on initial build and not on HMR updatesRelated Issue
#3110
Types of changes
Checklist