Skip to content

link generation breaks when trying to use import X as Y syntax #2140

@qballer

Description

@qballer

Describe the bug

Here is a fork for polaris-react - https://github.com/qballer/polaris

The autocomplete component consumes the TextField component and renames TextFiel to BaseTextField. When the compiler runs and isolates it in the capsule the link file is trying to import BaseTextField from TextField - but this export doesn't exist. It's a rename that autocomplete does.

Steps to Reproduce

  1. rm -rf /tmp/bit
  2. clone https://github.com/qballer/polaris
  3. DEBUG=true bit build autocomplete
    ----wait---
  4. Go over the console.log and find the capsule of autocomplete.
  5. go to the capsule folder and you can run tsc directly there to find the faulted link file.

Expected Behavior

Link generation should export the original exports from the component and not the renamed text.

Specifications

bit version : 14.4.3
node version : v12.3.1
npm version : 6.12.0
yarn version : 1.16.0
platform : linux

  • Bit compiler (include version): see github repo
  • Bit tester (include version): N/A

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions