Skip to content

dynamicImportInCjs

  • Type: optional dynamicImportInCjs: boolean

Whether to keep external dynamic imports as import(...) expressions in CommonJS output.

If set to false, external dynamic imports will be rewritten to use require(...) calls. This may be necessary to support environments that do not support dynamic import() in CommonJS modules like old Node.js versions.

Default

ts
true

Released under the MIT License.