How to use the babel-plugin-dynamic-import-node/utils.createDynamicImportTransform function in babel-plugin-dynamic-import-node

To help you get started, we’ve selected a few babel-plugin-dynamic-import-node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github babel / babel / packages / babel-plugin-transform-modules-commonjs / src / index.js View on Github external
export default declare((api, options) => {
  api.assertVersion(7);

  const transformImportCall = createDynamicImportTransform(api);

  const {
    loose,

    // 'true' for non-mjs files to strictly have .default, instead of having
    // destructuring-like behavior for their properties.
    strictNamespace = false,

    // 'true' for mjs files to strictly have .default, instead of having
    // destructuring-like behavior for their properties.
    mjsStrictNamespace = true,
    allowTopLevelThis,
    strict,
    strictMode,
    noInterop,
    lazy = false,

babel-plugin-dynamic-import-node

Babel plugin to transpile import() to a deferred require(), for node

MIT
Latest version published 5 years ago

Package Health Score

77 / 100
Full package analysis