Skip to content

[code-infra] Add flat build setup#4959

Merged
brijeshb42 merged 2 commits into
mui:masterfrom
brijeshb42:add-flat-build
Jun 10, 2026
Merged

[code-infra] Add flat build setup#4959
brijeshb42 merged 2 commits into
mui:masterfrom
brijeshb42:add-flat-build

Conversation

@brijeshb42

Copy link
Copy Markdown
Contributor

Adds the flat build setup (code-infra build --flat): build output is flat with extension-based module type (.js CJS, .mjs ESM, .d.ts/.d.mts types) instead of separate esm/cjs subdirectories.

Verified publint and attw pass.

🤖 Generated with Claude Code

@brijeshb42 brijeshb42 added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Jun 2, 2026
@brijeshb42 brijeshb42 requested a review from a team June 2, 2026 10:13
@pkg-pr-new

pkg-pr-new Bot commented Jun 2, 2026

Copy link
Copy Markdown

commit: ec4f331

"./store": "./src/store/index.ts",
"./*": "./src/*.ts"
"./*": "./src/*.ts",
"./*.test": null,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

required because ./src/*.ts expands to also include the test/spec files.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we do this in the build tool itself?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah. I'll take that up separately and create a new PR here.

@code-infra-dashboard

code-infra-dashboard Bot commented Jun 2, 2026

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 838.37 ms ▼-424.81 ms(-33.6%) | Renders: 50 (+0) | Paint: 1,274.48 ms ▼-635.78 ms(-33.3%)

Test Duration Renders
Slider mount (300 instances) 119.91 ms ▼-81.72 ms(-40.5%) 3 (+0)
Tabs mount (200 instances) 151.00 ms ▼-70.46 ms(-31.8%) 4 (+0)
Select mount (200 instances) 93.52 ms ▼-61.08 ms(-39.5%) 3 (+0)
Popover mount (300 instances) 47.01 ms ▼-32.63 ms(-41.0%) 1 (+0)
Checkbox mount (500 instances) 52.08 ms ▼-29.96 ms(-36.5%) 1 (+0)

…and 6 more (+1 within noise) — details


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Jun 2, 2026

Copy link
Copy Markdown

Deploy Preview for base-ui ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ec4f331
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a2962ea4594ad0008c93725
😎 Deploy Preview https://deploy-preview-4959--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@brijeshb42 brijeshb42 force-pushed the add-flat-build branch 3 times, most recently from 150adbb to e9fc98f Compare June 8, 2026 06:32
*/
export default defineConfig(async () => {
return {
entrypoints: [...(await getBaseUiExports()), ...(await getUtilsExports())],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, we can probably use expand now to simplify this. But doesn't have to be part of this effort.

@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jun 8, 2026
@github-actions github-actions Bot added PR: out-of-date The pull request has merge conflicts and can't be merged. and removed PR: out-of-date The pull request has merge conflicts and can't be merged. labels Jun 8, 2026
@brijeshb42 brijeshb42 requested a review from Janpot June 9, 2026 04:20

@Janpot Janpot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks mostly good, but I'm not keen on the package.json update. The build output shouldn't contain spec/test files. Maybe we should only expand those paths that have build output, even though there are more source files that match?

brijeshb42 and others added 2 commits June 10, 2026 18:42
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jun 10, 2026
@brijeshb42 brijeshb42 requested a review from Janpot June 10, 2026 13:14
@brijeshb42 brijeshb42 merged commit d86acd1 into mui:master Jun 10, 2026
23 checks passed
@brijeshb42 brijeshb42 deleted the add-flat-build branch June 10, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants