Skip to content
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 loading index.html in dev server when packager/optimizer changes bundle type #7527

Merged
merged 2 commits into from Jan 6, 2022

Conversation

devongovett
Copy link
Member

Packagers and optimizers can return a type, which overrides the bundle type. However, this was not correctly exposed by PackagedBundle which still returned the old type. That prevented the dev server from finding index.html for example.

@height
Copy link

height bot commented Jan 5, 2022

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

return `/${relativePath(this.options.distDir, p, false)}`;
});
let htmlBundleFilePaths = this.bundleGraph
.getBundles()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getBundles excludes inline bundles by default

@parcel-benchmark
Copy link

parcel-benchmark commented Jan 5, 2022

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 2.43s +6.00ms
Cached 386.00ms +23.00ms ⚠️

Cold Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 709.00ms +404.00ms ⚠️
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 710.00ms +403.00ms ⚠️
dist/modern/parcel.7cdb0fad.webp 102.94kb +0.00b 710.00ms +403.00ms ⚠️

Cached Bundles

No bundle changes detected.

React HackerNews ✅

Timings

Description Time Difference
Cold 11.66s -75.00ms
Cached 505.00ms +2.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 1.26m -950.00ms
Cached 1.68s -54.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

Bundle Size Difference Time Difference
dist/editorView.124f5fc0.js 594.92kb +0.00b 57.73s +14.98s ⚠️
dist/popup.64bc9a82.js 209.67kb +0.00b 57.73s +14.98s ⚠️
dist/EmojiPickerComponent.922af3e4.js 147.13kb +0.00b 23.49s -12.30s 🚀
dist/Toolbar.1af0e801.js 107.23kb +0.00b 57.73s +14.98s ⚠️
dist/Modal.cd71eaf3.js 45.33kb +0.00b 57.73s +14.98s ⚠️
dist/esm.f1a592e5.js 33.15kb +0.00b 23.49s -12.30s 🚀
dist/DatePicker.f2994e45.js 22.98kb +0.00b 23.49s -12.30s 🚀
dist/js.660b75db.js 17.25kb +0.00b 43.34s -14.32s 🚀
dist/ui.5d3f7adc.js 14.94kb +0.00b 57.73s +14.97s ⚠️
dist/smartMediaEditor.48c8cf63.js 13.25kb +0.00b 57.73s +14.98s ⚠️
dist/dropzone.39132d0c.js 12.16kb +0.00b 57.73s +14.98s ⚠️
dist/EmojiPickerComponent.0482d6c0.js 3.73kb +0.00b 57.73s +14.97s ⚠️
dist/png-chunks-extract.5c9c0fb9.js 3.58kb +0.00b 43.34s -14.32s 🚀
dist/dropzone.55bef257.js 3.29kb +0.00b 57.73s +14.98s ⚠️
dist/clipboard.df70240c.js 2.93kb +0.00b 57.73s +14.98s ⚠️
dist/ResourcedEmojiComponent.667554b4.js 2.12kb +0.00b 57.73s +14.97s ⚠️
dist/feedback.c7e69064.js 1.77kb +0.00b 23.49s -12.30s 🚀
dist/browser.4e039ed7.js 1.69kb +0.00b 57.73s +14.98s ⚠️
dist/workerHasher.3639b1f9.js 1.63kb +0.00b 23.49s -12.30s 🚀
dist/heading6.a693146e.js 1.51kb +0.00b 23.47s -12.33s 🚀
dist/heading5.8bfafe21.js 1.38kb +0.00b 23.47s -12.33s 🚀
dist/expand.a44d10fe.js 1.29kb +0.00b 23.49s -12.30s 🚀
dist/media-card-analytics-error-boundary.c718a9a7.js 1.12kb +0.00b 57.73s +14.98s ⚠️
dist/media-picker-analytics-error-boundary.8b2547e5.js 966.00b +0.00b 57.73s +14.98s ⚠️
dist/simpleHasher.fc0d6100.js 643.00b +0.00b 57.73s +14.97s ⚠️

Three.js ✅

Timings

Description Time Difference
Cold 7.98s +20.00ms
Cached 447.00ms -15.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Click here to view a detailed benchmark overview.

@devongovett devongovett merged commit 3f5b181 into v2 Jan 6, 2022
@devongovett devongovett deleted the fix-server-type branch January 6, 2022 17:04
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.

None yet

3 participants