sarsamurmu / reboost

A super fast dev server for rapid web development
MIT License
61 stars 3 forks source link

"esbuildPlugin - jsx.target" mismatch type declaration #22

Closed GHNewbiee closed 4 years ago

GHNewbiee commented 4 years ago

In esbuildPlugin, jsx.target property gives an error. See photo below.

Screenshot

sarsamurmu commented 4 years ago

You are doing it wrong, it should be like this

{
  loaders,
  jsx: {
    fragment,
    factory
  },
  target,
  minify,
  define
}
GHNewbiee commented 4 years ago

Yes, sorry!

Just for reference: In case that esbuildPlugin.config.js is used then the following has to be added at the beginning of the file:

/** @type import('reboost').esbuildPlugin['esbuildPluginOptions'] */

sarsamurmu commented 4 years ago

Also you can do /** @type import('reboost').PluginOptions['esbuild'] */