This is a tsup plugin that convert exports.default
to modules.exports
for CommonJS modules.
npm i tsup-fix-cjs-exports -D
// tsup.config.js
import fixCjsExports from 'tsup-fix-cjs-exports'
export default defineConfig({
// ... other tsup config
plugins: [fixCjsExports()],
})
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue and describe your request.
tsup-fix-cjs-exports © Mahmoud Ibrahiam, Released under the MIT License.