-
-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Labels
Description
I have a vite project released as a front-end library, and I want to use the rolldown-plugin-dts to bundle types, the tsdown.config.ts:
import { defineConfig } from "tsdown";
export default defineConfig({
entry: ["src/main.ts"],
clean: false,
dts: { emitDtsOnly: true, oxc: true },
});Generates such output:
ERROR Error: Build failed with 1 error:
[plugin rolldown-plugin-dts:resolver]
RollupError: Cannot resolve import './styles.scss' from '/path/to/main.d.ts'
I guess the ignoreFiles trick in tsup can be applied here, which simply ignores (load as empty js) files that are not likely to have types.
glen-cheney