-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
refactor(core): code cleanup #7084
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-7084--docusaurus-2.netlify.app/ |
Size Change: -73 B (0%) Total Size: 803 kB
ℹ️ View Unchanged
|
I don't understand what is going on here, but that doesn't look like minor code cleanup Please explain what is going on, and why the registry format changed for example. I'm not against the change, but I'd like these things to not be hidden in a "code cleanup" PR with a 2 words description. It's important over time to understand why changes like these were made, and preferably doing those in separate PRs with a good explanation. |
The registry didn't change at all—the generated code is exactly the same. The only changed thing is that all codegen now happens within the |
Another reason—not very major, because I'm not sure yet—is that if we are to migrate to other code-splitting library, we may need to change the registry format. Right now, the |
"loader": "() => import(/* webpackChunkName: '__comp---hello-world-jse-0-f-b6c' */ 'hello/world.js')", | ||
"modulePath": "hello/world.js", | ||
}, | ||
"__comp---hello-world-jse-0-f-b6c": "hello/world.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do these snapshots change if behavior is the same as before? 🤷♂️
The new snapshot format is not even looking like what I have running locally, so I don't understand what is happening here
If it's a refactor, snapshots shouldn't change? 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This snapshot is a shot of the internal return of loadRoutes
, not what registry.js
looks like. We have another snapshot for registry.js
which doesn't change at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see thanks 👍
Motivation
Minor code cleanup.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Builds