Reproduction link or steps
Here is a PR setting up rolldown-plugin-dts in one of our packages:
hashintel/hash#8509
Describe the bug
I understand that this is not meant to be used in Vite 8 yet, but wanted to give it a try.
The current setup working for me is to enforce: pre on the fake-js plugin:
dts({ tsgo: true }).map((plugin) =>
// Ensure runs before Vite's native TypeScript transform
plugin.name.endsWith("fake-js") ? { ...plugin, enforce: "pre" } : plugin,
)
Maybe this could be enforced somehow in the Rolldown plugin directly (I know the Plugin types are different between them, but would be convenient)
When using the plugin as is: (with tsgo)
I get this error:
transforming (1178) src/components/spreadsheet.tsx🐼 info [hrtime] Extracted in (126.93ms)
✓ 1185 modules transformed.
✗ Build failed in 5.97s
error during build:
Build failed with 1 error:
[MISSING_EXPORT] Error: "isSDCPNEqual" is not exported by "src/lib/deep-equal.d.ts".
╭─[ src/petrinaut.d.ts:3:10 ]
│
3 │ export { isSDCPNEqual } from "./lib/deep-equal";
│ ──────┬─────
│ ╰─────── Missing export
───╯
at aggregateBindingErrorsIntoJsError (file:///Users/HASH/Code/hash/cf-petrinaut-tsgo-dts/libs/@hashintel/petrinaut/node_modules/vite/node_modules/rolldown/dist/shared/error-BYPsvVEN.mjs:52:18)
at unwrapBindingResult (file:///Users/HASH/Code/hash/cf-petrinaut-tsgo-dts/libs/@hashintel/petrinaut/node_modules/vite/node_modules/rolldown/dist/shared/error-BYPsvVEN.mjs:22:128)
at #build (file:///Users/HASH/Code/hash/cf-petrinaut-tsgo-dts/libs/@hashintel/petrinaut/node_modules/vite/node_modules/rolldown/dist/shared/rolldown-build-BsRSEDqH.mjs:3356:34)
at async buildEnvironment (file:///Users/HASH/Code/hash/cf-petrinaut-tsgo-dts/libs/@hashintel/petrinaut/node_modules/vite/dist/node/chunks/node.js:32703:64)
at async Object.build (file:///Users/HASH/Code/hash/cf-petrinaut-tsgo-dts/libs/@hashintel/petrinaut/node_modules/vite/dist/node/chunks/node.js:33125:19)
at async Object.buildApp (file:///Users/HASH/Code/hash/cf-petrinaut-tsgo-dts/libs/@hashintel/petrinaut/node_modules/vite/dist/node/chunks/node.js:33122:153)
at async CAC.<anonymous> (file:///Users/HASH/Code/hash/cf-petrinaut-tsgo-dts/libs/@hashintel/petrinaut/node_modules/vite/dist/node/cli.js:642:3) {
errors: [Getter/Setter]
}
System Info
System:
OS: macOS 26.3
CPU: (10) arm64 Apple M1 Max
Memory: 1.79 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.21.1 - /Users/HASH/.local/share/mise/installs/node/22.21.1/bin/node
Yarn: 4.12.0 - /Users/HASH/.local/share/mise/installs/node/22.21.1/bin/yarn
npm: 10.9.4 - /Users/HASH/.local/share/mise/installs/node/22.21.1/bin/npm
Browsers:
Chrome: 145.0.7632.160
Safari: 26.3
Validations
Contributions
Compensating engineering work will speed up resolution and support the project
Reproduction link or steps
Here is a PR setting up
rolldown-plugin-dtsin one of our packages:hashintel/hash#8509
Describe the bug
I understand that this is not meant to be used in Vite 8 yet, but wanted to give it a try.
The current setup working for me is to
enforce: preon thefake-jsplugin:Maybe this could be enforced somehow in the Rolldown plugin directly (I know the Plugin types are different between them, but would be convenient)
When using the plugin as is: (with
tsgo)I get this error:
System Info
System: OS: macOS 26.3 CPU: (10) arm64 Apple M1 Max Memory: 1.79 GB / 64.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.21.1 - /Users/HASH/.local/share/mise/installs/node/22.21.1/bin/node Yarn: 4.12.0 - /Users/HASH/.local/share/mise/installs/node/22.21.1/bin/yarn npm: 10.9.4 - /Users/HASH/.local/share/mise/installs/node/22.21.1/bin/npm Browsers: Chrome: 145.0.7632.160 Safari: 26.3Validations
Contributions
Compensating engineering work will speed up resolution and support the project