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

feat: improve module formats (cjs, esm, iife) #1247

Merged
merged 6 commits into from May 20, 2022
Merged

Conversation

kettanaito
Copy link
Member

  • Adopts tsup over rollup.
  • Distributes /node in CJS and ESM.
  • Distributes /native in CJS and ESM.

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 20, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 721f499:

Sandbox Source
MSW React Configuration

`[MSW] Failed to automatically update the worker script at "%s": given path does not exist.`,
workerDirectory,
)
process.exit()
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is a bad idea. These cases are meant to halt early but don't exit the process (npm install).

@kettanaito
Copy link
Member Author

Released: v0.41.0 🎉

This has been released in v0.41.0!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

@nvh95
Copy link
Contributor

nvh95 commented May 22, 2022

@kettanaito Can you briefly ELI5 the benefit of replacing rollup with tsup? Thank you.

@ryota-murakami
Copy link

@kettanaito I have a abandoned package that has never new release over 2 years.
This configuration will be very helpful for me to make a modern formant release! 😄
@nvh95 your jest-preview too! 🚀

@kettanaito
Copy link
Member Author

Hey, @nvh95. Absolutely.

The main reason to adopt tsup (which, transiently, adopts esbiuld) is the build speed. By that bundler migration alone I've reduced the build speed on CI from ~1m 50s to 7s. I'm lazy to do the math but that looks like a ginormous improvement to me.

Other than that I find Rollup and esbuild almost synonymous in terms of consumer experience. I can write plugins for both, they certainly get the job done.

@ryota-murakami, I'd be glad if it helps you in any way. Make those releases happen!

@ryota-murakami
Copy link

@kettanaito Thank you! 😄

@nvh95
Copy link
Contributor

nvh95 commented May 22, 2022

Thank you for the explanarion.

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.

None yet

3 participants