Skip to content

Wrong "import" in UMD bundle of UMD package  #1064

Closed
@stereobooster

Description

@stereobooster

I converted itemsjs to ES modules and use microbundle to bundle it for npm. ES bundle works ok. But umd bundle throws an error

Uncaught TypeError: u.default is not a function

I checked generated UMD, it seems u.default is referring to lunr. lunr itself is published as UMD. I guess this is an issue, but hard to tell

git clone https://github.com/stereobooster/itemsjs
git checkout js
npm ci
npm run build

Related: itemsapi/itemsjs#135

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions