[code-infra] New bundler subcommand for package bundling#1083
Draft
brijeshb42 wants to merge 5 commits intomasterfrom
Draft
[code-infra] New bundler subcommand for package bundling#1083brijeshb42 wants to merge 5 commits intomasterfrom
brijeshb42 wants to merge 5 commits intomasterfrom
Conversation
fbe37fa to
022ef04
Compare
022ef04 to
9f51ded
Compare
Bundle size report
Check out the code infra dashboard for more information about this PR. |
9f51ded to
6f8240d
Compare
6f8240d to
9ce13e8
Compare
9ce13e8 to
04907ff
Compare
04907ff to
c1b4a49
Compare
c1b4a49 to
6086708
Compare
6086708 to
64e8f0b
Compare
64e8f0b to
2cc6bf3
Compare
2cc6bf3 to
a1ac52d
Compare
a1ac52d to
9572b86
Compare
9572b86 to
e7503df
Compare
e7503df to
b0d8687
Compare
b0d8687 to
0d08952
Compare
0d08952 to
41807a4
Compare
41807a4 to
71b865f
Compare
* Handles babel integration * Output file extension based on "type" in package.json * Adapter based so it it simpler to port to another bundler in future
71b865f to
5388375
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a new
bundleCLI subcommand for@mui/internal-code-infrato build and bundle packages using Rollup with Babel integration.Changes
New Features
New
bundleCLI subcommand (pnpm code-infra bundle)"type"field in package.jsonpackage.jsonexports and bin fieldspackage.jsonin output directoryRollup adapter implementation (
adapter-rollup.mjs)@rollup/plugin-babel@rollup/plugin-node-resolve@rollup/plugin-replacerollup-plugin-dts'use client') viarollup-plugin-preserve-directivesEntry point resolution utilities (
resolve-entrypoints.mjs)import,require,types,react-server, etc.)Exports field generation (
generate-exports-field.mjs)exportsfield structure from bundler outputBug Fixes
Fix side-effect tree-shaking - Improved tree-shaking by properly handling side effects in the bundling process
Babel runtime interop plugin (
babel-runtime-interop-plugin.mjs)@babel/runtime/helpers_interopNamespaceCompat,_interopNamespaceDefault, and_interopNamespacehelpers across output filesOther Changes
Migrated
babel.config.jstobabel.config.mjs(ESM format)Updated
@mui/internal-babel-configwith additional configuration optionsAdded comprehensive test suites for
resolve-entrypointsandgenerate-exports-fieldutilities (1,430 lines of tests)New dependencies added to
code-infra:@rollup/plugin-babel@rollup/plugin-node-resolve@rollup/plugin-replacerolluprollup-plugin-dtsrollup-plugin-preserve-directives[code-infra] Migrate to rollup based package build base-ui#3901