Skip to content

JavaScript API no longer provides names of imports #1992

Closed

Description

@lukastaegert

When debugging an issue with a test in rollup-plugin-node-resolve (cf. rollup/rollup-plugin-node-resolve#141), it turned out that as of v0.55.0, rollup always returns an empty array for imports in its JavaScript API here:

imports: chunk.getImportIds(),

I did not find the time yet to investigate further but obviously there seems to be something wrong with Chunk.getImportIds(). exports and modules, on the other hand, seem to be working to specification.

Activity

  1. changed the title [-]Node API no longer provides names of imports[/-] [+]JavaScript API no longer provides names of imports[/+] on Feb 20, 2018
  2. guybedford commented on Feb 20, 2018

    @guybedford
    Contributor

    @lukastaegert do you perhaps have a test case? Note that imports are only present for externals and other chunks. I've definitely got it working in my code splitting workflows here.

  3. lukastaegert commented on Feb 20, 2018

    @lukastaegert
    MemberAuthor

    I do not have a test case other than the original test in rollup/rollup-plugin-node-resolve#141 but I see you already started looking into that. Thanks!

  4. lukastaegert commented on Feb 20, 2018

    @lukastaegert
    MemberAuthor

    Might also be an incompatibility with that plugin.

  5. guybedford commented on Feb 20, 2018

    @guybedford
    Contributor

    I've tracked down a fix, will post a PR very soon.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions