Closed ArnaudBarre closed 1 year ago
@vaibhavshn I'm able to reproduce the issue. It also happens with vite 3 and the babel plugin v2.
Using external: ["react", "react/jsx-runtime"]
or classic runtime with the Babel plugin fixes the issue.
The fact that both and dev version are bundled seems ok because NODE_ENV is not set when bundling for libs, and this can allow to publish libs with both dev and production mode.
So I think this is working as intended
Yes, this was it. Thanks @ArnaudBarre!
Reported by @vaibhavshn on Discord
Repro: https://github.com/vaibhavshn/vite-react-swc-test