rollup / rollup-plugin-commonjs

This module has moved and is now available at @rollup/plugin-commonjs / https://github.com/rollup/plugins/blob/master/packages/commonjs
MIT License
502 stars 126 forks source link

[discuss][feature request] Is it possible to use .d.ts file to detect cjs exports? #340

Closed hh9527 closed 4 years ago

hh9527 commented 6 years ago

For now, auto export detection will fail in many case, even in some popular libs (such as react), we need to manually configure it via namedExports in every project.

So is it possible to use .d.ts for export detection?

Microsoft has maintained (and continue maintaining) a large amount of d.ts in @types/xxx, maybe we can rely on them.

If we can do this, a lot of manual configuration can be avoided.

shellscape commented 4 years ago

Hey folks (this is a canned reply, but we mean it!). Thanks to everyone who participated in this issue. We're getting ready to move this plugin to a new home at https://github.com/rollup/plugins, and we have to do some spring cleaning of the issues to make that happen. We're going to close this one, but it doesn't mean that it's not still valid. We've got some time yet before the move while we resolve pending Pull Requests, so if this issue is still relevant, please @ me and I'll make sure it gets transferred to the new repo. :beer: