Skip to content

configure unplugin-unused #255

@altano

Description

@altano

Clear and concise description of the problem

I'd like to configure unplugin-unused to error instead of warn, and to ignore a few packages (https://github.com/unplugin/unplugin-unused?tab=readme-ov-file#usage).

Suggested solution

The unused option is currently a boolean (on or off). Can we instead make it a configuration object that takes the unplugin-unused settings?

Alternative

Alternatively, we could just document this as supported, which seems to work for me:

import UnpluginUnused from "unplugin-unused/rolldown";

const config = defineConfig({
  // ...
  inputOptions: {
    plugins: [
      UnpluginUnused({
        level: "error",
      }),
    ],
  },

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions