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

Changed bundler to Rollup #367

Merged
merged 23 commits into from
Mar 23, 2020
Merged

Changed bundler to Rollup #367

merged 23 commits into from
Mar 23, 2020

Conversation

krisk
Copy link
Owner

@krisk krisk commented Mar 21, 2020

Ok, a bunch of goodies here:

  • Added ES6 modules for bundlers and browsers (fixed ES6 Modules #262)
  • Added CommonJS
  • Added UMD
  • Refactored TS definition, and filled out all its missing parts
  • Converted source code to ES6
  • Name change so that .min actually reflects the minified version. I bet this will surprise a few folks. Forgive me, world 🙏.

cc: @KonradHoeffner @sidvishnoi @cshoredaniel

krisk added 2 commits March 20, 2020 17:54
- Added ES6 modules for bundlers and browsers (fixed #262)
- Added CommonJS
- Added UMD
- Name change so that .min actually reflects the minified version
build/build.main.js Outdated Show resolved Hide resolved
build/build.main.js Outdated Show resolved Hide resolved
build/build.main.js Outdated Show resolved Hide resolved
@sidvishnoi
Copy link

I love it! Great work!
Massive PR by the way! 😸

README.md Outdated

| | UMD | CommonJS | ES Module (for bundlers) | ES Module (for browsers) |
| --------------------- | ----------- | -------------- | ------------------------ | ------------------------ |
| **Full** | fuse.js | fuse.common.js | fuse.esm.js | fuse.esm.browser.js |

Choose a reason for hiding this comment

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

I'm not understanding why fuse.esm.js might be needed. Bundlers can use fuse.esm.browser.js, right?

Copy link
Owner Author

@krisk krisk Mar 22, 2020

Choose a reason for hiding this comment

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

Just added the explanation here.

Does it clarify things?

Choose a reason for hiding this comment

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

Not quite. I looked at both dist/fuse.esm.js and dist/fuse.esm.browser.js, there isn't much difference that could be used for tree shaking (there is a single default export in both). The only difference I saw is fuse.esm.js is transpiled, while browser one is not. When people are using bundlers, they often use transpilers along with it. So we shouldn't need a fuse.esm.js (and rename fuse.esm.browsers.js to fuse.esm.js), unless I'm missing something.

Copy link

@sidvishnoi sidvishnoi Mar 23, 2020

Choose a reason for hiding this comment

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

Slightly late to mention, but having a fuse.esm.min.js would be nice to have (for browsers).
Thanks for working on it though! 😻

Copy link
Owner Author

Choose a reason for hiding this comment

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

I can add it as part of v5.2.0

@krisk krisk merged commit e74a9ef into master Mar 23, 2020
@krisk krisk deleted the bundler branch March 23, 2020 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ES6 Modules
2 participants