vault-development / react-native-svg-uri

Render SVG images in React Native from an URL or static file
850 stars 334 forks source link

Update to use default export instead of module.exports #162

Open jgornick opened 5 years ago

jgornick commented 5 years ago

In order to better support JS modules, the export from the package should be a default export as specified in the types file. The implementation of the module and the type definitions are different.

The module uses module.exports = ..., however, the types define it as export default ...

It would help to have these consistent.

Thanks!

NiciusB commented 4 years ago

I'm using Expokit to use my react native app in the web. While react-native-svg-uri works fine for ios and android, webpack errors out on the web due to mixing ES6 modules (import xmldom from 'xmldom') with nodejs modules (module.exports =)

This is a one line change and should not break anything, since ES6 modules are already being used on imports