Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v.1.1.0] webpack -> rollup, to support ESM bundle #1

Merged
merged 16 commits into from
May 7, 2022
Merged

Conversation

Jay-WKJun
Copy link
Owner

Summary

These days, almost browsers are now support ESM system, so we can take advantage of ESM system.

so, i choose to support addtional ESM bundle, so that my library user's can take advantage of ESM system without any change of features.

and i choose to Rollup.js bundler to support it.

Webpack does support ESM library bundle but it's experiment version now.

ref: https://webpack.kr/configuration/output/#type-module

Improvement

ESM module

additional ESM module can use.

/* package.json */
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
"exports": {
  "import": "./dist/es/index.js",
  "require": "./dist/cjs/index.js"
},

lighter

besides of additional ESM bundle, library isn't go heavier than previous one.

It's lighter than the previous one.

Same Feature

It has same features as before. It's all same.

@Jay-WKJun Jay-WKJun self-assigned this May 7, 2022
@Jay-WKJun Jay-WKJun merged commit c08a6d4 into main May 7, 2022
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.

1 participant