-
-
Notifications
You must be signed in to change notification settings - Fork 583
Enable plugins to be async #2675
Copy link
Copy link
Closed
Labels
enhancementfeature: esmRelated to supporting ES Modules (in parallel to CommonJS)Related to supporting ES Modules (in parallel to CommonJS)feature: 🛠 configurationRelated to Eleventy’s Configuration fileRelated to Eleventy’s Configuration file
Milestone
Metadata
Metadata
Assignees
Labels
enhancementfeature: esmRelated to supporting ES Modules (in parallel to CommonJS)Related to supporting ES Modules (in parallel to CommonJS)feature: 🛠 configurationRelated to Eleventy’s Configuration fileRelated to Eleventy’s Configuration file
Type
Fields
Give feedbackNo fields configured for issues without a type.
Is your feature request related to a problem? Please describe.
There is a 11ty plugin for the syntax highlighting library shiki twoslash. This libary uses WASM under the hood and needs to run asynchronously. In the plugin, they need to fudge synchronous behavior by using the
deasyncto make it run in 11ty. For this reason, the performance is poor.For example, at the moment, I am currently migrating a website to 11ty with 100 pages and the build time is 1.5seconds, with incremental builds a file change reloads in milliseconds. If I add the twoslash plugin, it pushes the build time to 8 seconds, and incremental builds take the same time. Having that as a dev mode experience is too painful.
Describe the solution you'd like
Permitting an async function to be used by
addPlugin().Describe alternatives you've considered
Using
deasyncis the alternative tried.