Skip to content

Bug - Support for <script type="module.... #239

Description

@gdborton

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Using <script type="module"></script> for metro files creates runtime errors due to this being undefined at the module scope.

If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install and yarn test.

https://github.com/gdborton/metro-script-type-module <-- repro demo w/ steps in readme.

What is the expected behavior?
The script should execute as expected without generating a runtime error (at least from metro's code)

Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.
In the repro repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions