fix: Add missing unplugin-typegpu/rolldown-browser entrypoint#2427
Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (350 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.96, 1.92, 4.15, 6.12, 7.43, 11.26, 23.48, 23.62]
line [0.92, 1.90, 4.39, 6.90, 7.07, 10.57, 21.61, 23.09]
line [0.91, 1.81, 4.05, 6.38, 7.65, 10.91, 21.90, 23.15]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.29, 0.55, 0.72, 0.81, 1.08, 1.17, 1.44, 1.54]
line [0.36, 0.55, 0.75, 0.83, 1.19, 1.21, 1.42, 1.62]
line [0.30, 0.54, 0.69, 0.81, 1.06, 1.17, 1.44, 1.55]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.80, 2.07, 3.99, 6.53, 13.02, 27.63, 57.47, 114.75]
line [0.90, 2.07, 4.08, 6.21, 12.47, 26.27, 56.79, 114.52]
line [0.88, 2.04, 3.85, 6.32, 12.43, 25.79, 55.26, 114.78]
|
There was a problem hiding this comment.
Pull request overview
This PR ensures the unplugin-typegpu/rolldown-browser entrypoint is actually built/published, and removes the ineffective internal process polyfill approach by switching to direct @babel/types imports.
Changes:
- Add
src/rolldown-browser.tstotsdownbuild entries so it’s emitted intodist/. - Remove the
core/polyfill-process.ts+core/babel-types.tsindirection and import@babel/typesdirectly where needed. - Update core/babel-related modules to use
import * as t from '@babel/types'.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/unplugin-typegpu/tsdown.config.ts | Adds rolldown-browser to build entry list so the export is produced in dist/. |
| packages/unplugin-typegpu/src/core/polyfill-process.ts | Removes the internal browser process polyfill. |
| packages/unplugin-typegpu/src/core/factory.ts | Switches Babel types import to @babel/types directly. |
| packages/unplugin-typegpu/src/core/common.ts | Switches Babel types import to @babel/types directly. |
| packages/unplugin-typegpu/src/core/babel-types.ts | Removes the wrapper module that existed only to apply the process polyfill + re-export types. |
| packages/unplugin-typegpu/src/babel.ts | Switches Babel types import to @babel/types directly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
324ce92 to
5c7f8b3
Compare
The process polyfill was not taking any effect anyway, as the order of imports can be mangled by bundlers. We can ask the users of unplugin-typegpu/babel in the browser to polyfill instead.
Tracking docs for this here: #2428