Skip to content

experimentalImportSupport has wrong exports for destructured object #1460

Description

@EvanBacon

The following code:

export const { A: B } = {};

Should be transformed to something like:

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.B = void 0;
const {
  A: B
} = {};
exports.B = B;

But with experimentalImportSupport enabled, you get:

const { A: B } = {};
exports.A = A;

Which is invalid syntax.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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