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

modernize 2.0 preact build #1269

Merged

Conversation

ChristopherBiscardi
Copy link
Member

This sets us up to modernize all of our builds by implementing microbundle on the preact package. This produces a commonjs build that is left as main because that's what people currently expect, an es build that gets used by webpack, etc under the module key, and a true es modern build that will get used conditionally by node v14 native esm when import is used. When require is used in v14, the commonjs build gets used.

After confirming this works in the preact package in the 2.0 release, we can do the same for our other builds. This puts us onto a well documented, maintained build tool for modern releases.

This sets us up to modernize all of our builds by implementing microbundle on the preact package. This produces a commonjs build that is left as main because that's what people currently expect, an es build that gets used by webpack, etc under the module key, and a true es modern build that will get used conditionally by node v14 native esm when `import` is used. When `require` is used in v14, the commonjs build gets used.
@vercel vercel bot temporarily deployed to Preview September 17, 2020 02:41 Inactive
@vercel
Copy link

vercel bot commented Sep 17, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mdx/mdx/prvhd3res
✅ Preview: https://mdx-git-fork-christopherbiscardi-next-microbundle-preact.mdx.vercel.app

Copy link
Member

@johno johno left a comment

Choose a reason for hiding this comment

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

🏗️

@johno
Copy link
Member

johno commented Sep 17, 2020

Looks great! We should probably move all our builds over to this.

@ChristopherBiscardi
Copy link
Member Author

We should probably move all our builds over to this.

tracking in #1271

@ChristopherBiscardi ChristopherBiscardi merged commit 8b4723f into mdx-js:next Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants