react-string-replace icon indicating copy to clipboard operation
react-string-replace copied to clipboard

ES6 Module declaration

Open niklaswolf opened this issue 5 years ago • 1 comments

Hi, I saw you answered a similar issue already (#19 ), and for WEbpack this solution works fine. But with for example Rollup it doesn't work. Error: 'default' is not exported by node_modules/react-string-replace/index.js

So would you accept a PR where we add ES6 compatibility?

niklaswolf avatar Jan 24 '20 15:01 niklaswolf

Hm, I think there is a webpack option for this. Maybe a rollup option too. Something like esModuleInterop (which is a typescript option) that will automatically resolve the default export even if the source code doesn't provide it.

But yeah would welcome a PR :)

iansinnott avatar Jan 25 '20 02:01 iansinnott