react-dnd / react-dnd

Drag and Drop for React

Home Page:http://react-dnd.github.io/react-dnd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@react-dnd/asap trigger swc error `env` and `jsc.target` cannot be used together

guoshencheng opened this issue · comments

Describe the bug

i'm using swc with @react-dnd, my swc transform options is

{
 filename: 'path2dir/@react-dnd/asap/dist/esm/index.mjs',
  sourceMaps: true,
  jsc: {
    transform: { react: [Object], legacyDecorator: true },
    externalHelpers: true
  },
  module: { type: 'es6', noInterop: false },
  env: { loose: false, targets: [ 'chrome 55' ] }
}

i was set config.env first

but @react-dnd/asap also set swcrc by self。

it caused error

`env` and `jsc.target` cannot be used together

Expected behavior

maybe @react-dnd should remove .swcrc file when this package is publishing