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

Add support for local parcel plugins #8925

Merged
merged 4 commits into from
Apr 28, 2023
Merged

Add support for local parcel plugins #8925

merged 4 commits into from
Apr 28, 2023

Conversation

devongovett
Copy link
Member

@devongovett devongovett commented Apr 2, 2023

Closes #4321.

This adds support for referencing local Parcel plugins in .parcelrc configs using relative paths. This has been raised a few times before (e.g. #3397 and #4321) as a pain point when developing plugins that you want to test in a local project. It is already possible to load local plugins that aren't published to npm by using npm/yarn workspaces or the link: protocol in yarn, but if you aren't already using these systems it is a bit to set up. With this PR, you can reference a plugin using a relative path instead.

While local plugins are supported in apps, config packages (e.g. parcel-config-foo) cannot reference local plugins. This is so that published plugins can always be used independently of any config packages, which are simply shortcuts for using multiple plugins. This is important so plugins can be used separately or reordered as needed by the user, rather than stuck in the order the config defined them.

@parcel-benchmark
Copy link

parcel-benchmark commented Apr 2, 2023

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 1.87s +4.00ms
Cached 391.00ms -5.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 314.00ms +19.00ms ⚠️
dist/modern/parcel.7cdb0fad.webp 102.94kb +0.00b 314.00ms +19.00ms ⚠️
dist/legacy/index.7d75205b.js 1.63kb +0.00b 538.00ms +52.00ms ⚠️
dist/legacy/index.d20f91ee.js 1.19kb +0.00b 536.00ms +51.00ms ⚠️
dist/modern/index.1ee30fe4.js 1.12kb +0.00b 535.00ms +50.00ms ⚠️
dist/legacy/index.html 826.00b +0.00b 603.00ms +61.00ms ⚠️
dist/modern/index.html 749.00b +0.00b 602.00ms +60.00ms ⚠️

Cached Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 292.00ms +15.00ms ⚠️
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 293.00ms +15.00ms ⚠️
dist/modern/parcel.7cdb0fad.webp 102.94kb +0.00b 293.00ms +15.00ms ⚠️
dist/legacy/index.7d75205b.js 1.63kb +0.00b 489.00ms -51.00ms 🚀
dist/legacy/index.d20f91ee.js 1.19kb +0.00b 486.00ms -54.00ms 🚀
dist/modern/index.1ee30fe4.js 1.12kb +0.00b 485.00ms -56.00ms 🚀
dist/legacy/index.html 826.00b +0.00b 548.00ms -64.00ms 🚀
dist/modern/index.html 749.00b +0.00b 547.00ms -63.00ms 🚀
dist/legacy/index.b8ae99ba.css 94.00b +0.00b 304.00ms +16.00ms ⚠️

React HackerNews ✅

Timings

Description Time Difference
Cold 8.20s +22.00ms
Cached 501.00ms +24.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 1.19m -753.00ms
Cached 2.44s +51.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/media-viewer.bd165005.js 542.15kb +0.00b 9.70s -546.00ms 🚀
dist/ConfigPanelFieldsLoader.f06a6b36.js 312.08kb +0.00b 9.71s -546.00ms 🚀
dist/card.501ecffa.js 143.52kb +0.00b 9.70s -546.00ms 🚀
dist/ConfigPanelFieldsLoader.e1ae433f.js 83.45kb +0.00b 9.70s -546.00ms 🚀
dist/ElementBrowser.3bcad544.js 65.85kb +0.00b 9.70s -546.00ms 🚀
dist/archive.b919f1ad.js 61.47kb +0.00b 13.49s +3.25s ⚠️
dist/esm.945b66be.js 60.94kb +0.00b 9.70s -547.00ms 🚀
dist/component-lazy.60375b05.js 60.45kb +0.00b 7.40s +628.00ms ⚠️
dist/ConfigPanelFieldsLoader.ef739802.js 16.14kb +0.00b 9.70s -546.00ms 🚀
dist/ui.2de0ef21.js 14.88kb +0.00b 9.70s -546.00ms 🚀
dist/ConfigPanelFieldsLoader.c68d84ab.js 14.25kb +0.00b 9.70s -546.00ms 🚀
dist/pdfRenderer.187ba54d.js 12.21kb +0.00b 9.70s -546.00ms 🚀
dist/mobile-upload.136dd5cb.js 8.08kb +0.00b 9.70s -547.00ms 🚀
dist/mobile-upload.0bdb676c.js 8.08kb +0.00b 9.70s -550.00ms 🚀
dist/media-viewer-analytics-error-boundary.e6109a6a.js 3.46kb +0.00b 13.49s +3.25s ⚠️
dist/ru.896915b9.js 2.94kb +0.00b 9.70s +2.14s ⚠️
dist/uk.48c97550.js 2.89kb +0.00b 9.70s -546.00ms 🚀
dist/codeViewerRenderer.915ef6b3.js 2.84kb +0.00b 13.49s +3.25s ⚠️
dist/th.31044730.js 2.73kb +0.00b 9.70s -546.00ms 🚀
dist/vi.d8dcb67a.js 2.22kb +0.00b 9.70s -546.00ms 🚀
dist/tr.46f26598.js 2.16kb +0.00b 9.70s -546.00ms 🚀
dist/sv.13d93533.js 2.10kb +0.00b 9.70s -547.00ms 🚀
dist/zh_TW.afaf6222.js 1.98kb +0.00b 9.70s -546.00ms 🚀
dist/zh.fcdc32bb.js 1.96kb +0.00b 9.70s -546.00ms 🚀
dist/workerHasher.ef49a7fc.js 1.72kb +0.00b 9.70s -547.00ms 🚀
dist/workerHasher.9d5fe27b.js 1.72kb +0.00b 9.70s -550.00ms 🚀
dist/heading5.023a8f1f.js 1.36kb +0.00b 7.40s +628.00ms ⚠️
dist/sk.101f1705.js 786.00b +0.00b 9.70s +2.14s ⚠️
dist/simpleHasher.f1f58b0a.js 687.00b +0.00b 9.70s -547.00ms 🚀
dist/simpleHasher.09f4d713.js 687.00b +0.00b 9.70s -550.00ms 🚀
dist/ro.a6eff34a.js 612.00b +0.00b 9.70s +2.14s ⚠️
dist/index.html 240.00b +0.00b 13.57s +7.20s ⚠️

Cached Bundles

No bundle changes detected.

Three.js ✅

Timings

Description Time Difference
Cold 5.55s -31.00ms
Cached 306.00ms -9.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Click here to view a detailed benchmark overview.

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.

One-off/local plugins
3 participants