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

adapt preprocessor init #104

Closed
alexanderniebuhr opened this issue Apr 7, 2021 · 0 comments
Closed

adapt preprocessor init #104

alexanderniebuhr opened this issue Apr 7, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@alexanderniebuhr
Copy link
Member

allow pre-processor init to be async

notes:
It doesn't work because that signature is not supported. markup etc can be async, but the function creating that object cannot, if you want to pass it to the preprocess property of the rollup plugin or svelte.config.js
But since markup etc can be async you can easily work around that by waiting on common initialisation logic before doing the actual work
If the initialisation is synchronous, you can do it outside the functions. If it is asynchronous, you can just await the init promise, that logic will only run once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant