originjs / vite-plugins

Other
171 stars 30 forks source link

config some package require default or require all exports #38

Open ttshangxiang opened 2 years ago

ttshangxiang commented 2 years ago

in webpack's cjs bundle, has some package need require default, others need require all exports, can I config which need default and which need all exports?

aztack commented 1 year ago

react-draggable Try to read default in its code. image This will cause error: image Correct: image

image

This kind of scenario can be handled If we can configure which package should (or should not) read default.

related issues: https://github.com/originjs/vite-plugins/issues/22