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

Try to use import(..., { assert: { type: 'json' } }) for loading JSON configs #585

Open
bmish opened this issue Dec 9, 2024 · 0 comments
Labels

Comments

@bmish
Copy link
Owner

bmish commented Dec 9, 2024

See:

// For JSON files, have to require() instead of import(..., { assert: { type: 'json' } }) because of this error:
// Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. ts(1324)
// TODO: Switch to import() when we drop support for Node 14.
return require(pluginEntryPointAbs) as Plugin; // eslint-disable-line import/no-dynamic-require

Unblocked since we dropped Node 14 support.

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

No branches or pull requests

1 participant