Skip to content

babel transfrom runtime incompatible with url loader #10561

@samMeow

Description

@samMeow

Bug Report

Current Behavior
Babel dynamic import _interopRequireWildcard function fail if imported obj/ modules is pure string (e.g. base64 encoded image), because cache (WeakMap) doesn't accept string as key (only accept object).

Input Code
Ref: #10161

Expected behavior/code
_interopRequireWildcard should take care string module (url-loader/file-loader) also.

Environment

  • @babel/core": "^7.6.4"
  • node 10.15
  • @babel/plugin-transform-runtime: 7.6.2
  • url-loader : ^2.2.0

Possible Solution
Consider a different cache mechanism (e.g. Map/ no cache for string)

Screenshot 2019-10-16 at 2 15 17 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    outdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions