[code-infra] Add flat build setup#4959
Conversation
commit: |
| "./store": "./src/store/index.ts", | ||
| "./*": "./src/*.ts" | ||
| "./*": "./src/*.ts", | ||
| "./*.test": null, |
There was a problem hiding this comment.
required because ./src/*.ts expands to also include the test/spec files.
There was a problem hiding this comment.
Should we do this in the build tool itself?
There was a problem hiding this comment.
Yeah. I'll take that up separately and create a new PR here.
Bundle size
PerformanceTotal duration: 838.37 ms ▼-424.81 ms(-33.6%) | Renders: 50 (+0) | Paint: 1,274.48 ms ▼-635.78 ms(-33.3%)
…and 6 more (+1 within noise) — details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
150adbb to
e9fc98f
Compare
| */ | ||
| export default defineConfig(async () => { | ||
| return { | ||
| entrypoints: [...(await getBaseUiExports()), ...(await getUtilsExports())], |
There was a problem hiding this comment.
Ah, we can probably use expand now to simplify this. But doesn't have to be part of this effort.
e9fc98f to
c69a5da
Compare
c69a5da to
b125654
Compare
Janpot
left a comment
There was a problem hiding this comment.
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?
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
b125654 to
ec4f331
Compare
Adds the flat build setup (
code-infra build --flat): build output is flat with extension-based module type (.jsCJS,.mjsESM,.d.ts/.d.mtstypes) instead of separateesm/cjssubdirectories.Verified
publintandattwpass.🤖 Generated with Claude Code