Skip to content

Can not use empty options for plugin #43

@tmg0

Description

@tmg0

Describe the bug

Cannot use it as described in the documentation like:

// esbuild.config.js
import { build } from 'esbuild'

build({
  plugins: [require('unplugin-vue-jsx/esbuild')()],
})

And I have to provide a empty object {} as the option:

plugins: [require('unplugin-vue-jsx/esbuild')({})],

I found that userOptions has a default value, so if it's possible to support the empty options?

Reproduction

https://stackblitz.com/edit/stackblitz-starters-7or5g1?file=tsup.config.ts

System Info

System:
    OS: macOS 14.2
    CPU: (8) arm64 Apple M2
    Memory: 44.58 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.1 - ~/.volta/tools/image/node/18.19.1/bin/node
    npm: 10.2.4 - ~/.volta/tools/image/node/18.19.1/bin/npm
    pnpm: 8.15.4 - ~/.volta/tools/image/pnpm/8.15.4/bin/pnpm
  Browsers:
    Chrome: 122.0.6261.129
    Safari: 17.2

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions