Skip to content

feat: support experimental.async and dynamicCompileOptions for Svelte modules #1176

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

Merged
merged 9 commits into from
Jul 15, 2025

Conversation

dominikg
Copy link
Member

@dominikg dominikg commented Jul 14, 2025

resolves #1174

Due to the way CompileOptions extends ModuleCompileOptions and how compileModule throws an error if you pass in an unknown option, simply forwarding the complete compileOptions would cause validation errors.

This PR prevents that by filtering with known module option names, which is going to require future updates for any new option that has to be passed.

An alternative could be to filter remove known non-module options. This makes it easier to introduce new module options, but new non-module options would then require updating the list to avoid them causing a validation error on compileModule.

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

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

Good interim solution 👍
Filtering for known module compile options is better I think, since it's less likely that we add new module options vs new Svelte component options

@dominikg dominikg force-pushed the feat/support-experimental-svelte-option branch from 32cbf53 to 3a7b600 Compare July 15, 2025 14:29
@dominikg dominikg merged commit 6abf2c6 into main Jul 15, 2025
8 checks passed
@dominikg dominikg deleted the feat/support-experimental-svelte-option branch July 15, 2025 17:27
@github-actions github-actions bot mentioned this pull request Jul 15, 2025
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.

support experimental.async option in compileModule
2 participants