-
Notifications
You must be signed in to change notification settings - Fork 45
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 tree-shaking E2E page in production #1825
Conversation
Deployed to Cloudflare Pages
|
Hm. CI does not agree that anything more was tree-shaked:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1825 +/- ##
==========================================
+ Coverage 81.34% 81.37% +0.03%
==========================================
Files 192 192
Lines 5039 5042 +3
Branches 923 923
==========================================
+ Hits 4099 4103 +4
+ Misses 940 939 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Update: bundle no longer contains the string "Show unsafe inputs for Chrome". I guess the diff is <0.005 MB (inside 3.33 MB) |
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.
if we don't want to include e2e path with void lazy on prod we could do sth like (maybe)
const e2eRoutes = process.env.REACT_APP_E2E_TEST
? [
{
path: 'e2e',
lazy: async () => {
const { E2EPage } = await import('app/pages/E2EPage')
return { element: <E2EPage /> }
},
},
]
: []
...
...e2eRoutes,
+1; but this syntax seems cleaner: if (process.env.REACT_APP_E2E_TEST) {
commonRoutes.push({
path: 'e2e',
lazy: async () => {
const { E2EPage } = await import('app/pages/E2EPage')
return { element: <E2EPage /> }
},
})
} |
cc774e3
to
808e07c
Compare
TypeScript's import elision doesn't work with Parcel's dead branch removal.
808e07c
to
e9b0ec9
Compare
TypeScript's import elision doesn't work with Parcel's dead branch removal.