-
Notifications
You must be signed in to change notification settings - Fork 170
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
fix(import): correctly identify a default exported component #6453
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
liady
requested review from
gbalint,
seanparsons,
Rheeseyb,
ruggi,
balazsbajorics,
benwolfram and
bkrmendy
October 2, 2024 12:59
#14615 Bundle Size — 57.76MiB (~-0.01%).9467373(current) vs 916e8b9 master#14614(baseline) Warning Bundle contains 70 duplicate packages – View duplicate packages Bundle metrics
|
Current #14615 |
Baseline #14614 |
|
---|---|---|
Initial JS | 40.76MiB (~-0.01% ) |
40.76MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 18.49% |
38.03% |
Chunks | 21 |
21 |
Assets | 23 |
23 |
Modules | 4112 |
4112 |
Duplicate Modules | 213 |
213 |
Duplicate Code | 27.4% |
27.4% |
Packages | 475 |
475 |
Duplicate Packages | 70 |
70 |
Bundle size by type 2 changes
2 improvements
Current #14615 |
Baseline #14614 |
|
---|---|---|
JS | 57.75MiB (~-0.01% ) |
57.75MiB |
HTML | 7.37KiB (-0.25% ) |
7.39KiB |
Bundle analysis report Branch fix/default-export-comp Project dashboard
Generated by RelativeCI Documentation Report issue
seanparsons
approved these changes
Oct 3, 2024
liady
changed the title
fix(import): identify correctly when a default exported component is defined seperately
fix(import): correctly identif a default exported component
Oct 4, 2024
liady
changed the title
fix(import): correctly identif a default exported component
fix(import): correctly identify a default exported component
Oct 4, 2024
bkrmendy
approved these changes
Oct 7, 2024
liady
added a commit
that referenced
this pull request
Dec 13, 2024
**Problem:** Today we don't recognize when a default export is declared separately. ```ts function App(){...} export default App ``` this is not treated as a component when it's imported: <video src="https://github.com/user-attachments/assets/a52ce448-c324-44e9-bae1-9c64c3af21e5"></video> **Fix:** Use `isExportDefault` instead of a specific check for a function or a class **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Play mode Fixes #6439
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:
Today we don't recognize when a default export is declared separately.
this is not treated as a component when it's imported:
Monosnap.screencast.2024-10-02.14-48-14.mp4
Fix:
Use
isExportDefault
instead of a specific check for a function or a classManual Tests:
I hereby swear that:
Fixes #6439