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

11ty plugin is not practical to use #175

Open
robole opened this issue Dec 4, 2022 · 1 comment
Open

11ty plugin is not practical to use #175

robole opened this issue Dec 4, 2022 · 1 comment

Comments

@robole
Copy link

robole commented Dec 4, 2022

Hi,

Thanks for your great work!

At the moment, the 11ty plugin is not practical to use. 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.

The issue is clear, twoslash needs to run async and 11ty does not permit this behavior. I made a feature request with 11ty to enable plugins to be async. You can upvote that issue to help resolve this bottleneck.

@orta
Copy link
Contributor

orta commented Dec 4, 2022

That's pretty wild - there's result caching inside shiki-twoslash which might not be happening for some reason? (It's been a long time since I've looked in the code) which should just cache all the twoslash work, but still run the syntax highlighter at runtime. This was enough to make it usable on the place I was using it.

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

No branches or pull requests

2 participants