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

Use dynamic import expression to load plugin code #189

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Conversation

nrn
Copy link
Member

@nrn nrn commented Jun 19, 2024

This lets plugins choose whether to be es modules or not at the package level.

Shockingly easy server change to allow es modules in server side plugin code. Import expressions have been available and stable in node since at least v12, but this won't work in very old versions. By default this will still load server side plugins as common js modules because it hard codes the .js file extension, to switch a plugin to esmodules add "type": "module" to the top level of its package.json

Related to, but not dependent on fedwiki/wiki-client#320

This lets plugins choose whether to be es modules or not at the package level
@paul90 paul90 merged commit 849d8c9 into master Jul 23, 2024
3 checks passed
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.

None yet

2 participants