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

vm: support using the default loader to handle dynamic import() #51244

Merged
merged 5 commits into from
Feb 1, 2024

Commits on Jan 10, 2024

  1. vm: support using the default loader to handle dynamic import()

    This patch adds support for using
    `vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER` as
    `importModuleDynamically` in all APIs that take the option
    except `vm.SourceTextModule`. This allows users to have a shortcut
    to support dynamic import() in the compiled code without missing
    the compilation cache if they don't need customization of the
    loading process. We emit an experimental warning when the
    `import()` is actually handled by the default loader through
    this option instead of requiring `--experimental-vm-modules`.
    
    In addition this refactors the documentation for
    `importModuleDynamically` and adds a dedicated section for it
    with examples.
    
    `vm.SourceTextModule` is not supported in this patch because
    it needs additional refactoring to handle `initializeImportMeta`,
    which can be done in a follow-up.
    joyeecheung committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    4f055d2 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2024

  1. fixup! vm: support using the default loader to handle dynamic import()

    Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
    joyeecheung and legendecas committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    4a48345 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. fixup! vm: support using the default loader to handle dynamic import()

    Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
    joyeecheung and legendecas committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    0e47585 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Configuration menu
    Copy the full SHA
    edbd1d4 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2024

  1. Configuration menu
    Copy the full SHA
    0c45167 View commit details
    Browse the repository at this point in the history