Skip to content

feat: update build to support tree-shaking#130

Open
Geo25rey wants to merge 1 commit into
rarible:masterfrom
Geo25rey:master
Open

feat: update build to support tree-shaking#130
Geo25rey wants to merge 1 commit into
rarible:masterfrom
Geo25rey:master

Conversation

@Geo25rey

Copy link
Copy Markdown

No description provided.

filename: "rarible-sdk.js",
library: {
type: "module",
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong code: it duplicates code above

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Having umd and esm builds is common practice for libraries.

Umd is compatible with everything. Esm is not, but umd doesn't support tree shaking so adding an esm build is necessary.

Check out this article for more info: link

Comment thread tsconfig.json
"module": "commonjs",
"target": "es5",
"module": "ESNEXT",
"target": "es2015",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is breaking changes
be careful with it

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants