Skip to content

Bug: You have passed an unrecognized option: onLog when using Rollup v4 #362

@BykovDenis

Description

@BykovDenis

Checklist

•	I can reproduce this issue when running this plugin on its own.
•	I am running this plugin on .d.ts files generated by TypeScript.
•	This issue is not related to rolling up @types.

Code Snippet

// rollup.config.prod.js
import dts from "rollup-plugin-dts";

export default {
input: "./src/index.d.ts",
output: [{ file: "./dist/index.d.ts", format: "es" }],
plugins: [dts()],
};

Error Message

(!) You have passed an unrecognized option
Unknown input options: onLog. Allowed options: acorn, acornInjectPlugins, cache, context,
experimentalCacheExpiry, external, inlineDynamicImports, input, makeAbsoluteExternalsRelative,
manualChunks, maxParallelFileOps, maxParallelFileReads, moduleContext, onwarn, perf, plugins,
preserveEntrySignatures, preserveModules, preserveSymlinks, shimMissingExports, strictDeprecations,
treeshake, watch

Environment

•	rollup: 4.24.0
•	rollup-plugin-dts: 6.1.1
•	node: 22.20.0
     •      typescript: 5.7.3
•	os: macOS

Notes

This issue appears because Rollup v4 removed the onLog option from its core config.
rollup-plugin-dts still passes onLog internally, which triggers this warning/error.
It looks like this was already fixed in version 6.1.1, but the problem persists in 6.0.x.

Reference: rollup/rollup#5127

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions