-
-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Labels
Description
I'm having an issue after upgrading to `6.4.0` bundling to CJS.
Here is a simplified version of my react code:
// Component.tsx
import ReactSelect from 'react-select';
const Comp = (props) => {
return <ReactSelect {...props} />
}
// tsup.config.ts
export default {
bundle: true,
clean: true,
dts: true,
format: ['cjs', 'esm'],
minify: false,
sourcemap: true,
splitting: true,
target: 'es2022',
treeshake: 'smallest'
The generated CJS file with tsup v6.3.0
was working ✅
var ReactSelect = require('react-select');
var ReactSelect__default = /*#__PURE__*/_interopDefaultLegacy(ReactSelect);
var Comp = (props) => {
return /* @__PURE__ */ jsxRuntime.jsx(ReactSelect__default["default"], { ...props });
}
The generated CJS file with tsup v6.4.0
isn't working
var ReactSelect = require('react-select');
var Comp = (props) => {
return /* @__PURE__ */ jsxRuntime.jsx(ReactSelect, { ...props });
}
Do you know if there is additional rollup configuration I need to pass to have rollup resolving default
exports properly?
Originally posted by @csantos1113 in #749 (comment)