Commit Graph

5 Commits

Author SHA1 Message Date
Nicolas Gallagher
206a236df2 [add] AccessibilityInfo and DeviceInfo stubs 2018-05-29 11:04:27 -07:00
Nicolas Gallagher
61bf7e76b0 [fix] CommonJS exports can be imported without 'default'
Make sure all the CommonJS modules can be required as normal, rather
than needing to be suffixed with `.default` due to being compiled from
ES modules.
2018-05-29 11:04:24 -07:00
Nicolas Gallagher
004c7ce478 [change] export ES modules by default
ES modules are the default package export. Commonjs modules are exported
from 'dist/cjs'. Modern bundlers like webpack can consume ES modules.
The addition of the `sideEffects:false` to the `package.json` helps
webpack tree-shaking modules.
2018-05-18 17:27:36 -07:00
Nicolas Gallagher
a53372ceb3 [fix] babel-plugin only rewrites paths for known modules
Don't rewrite import paths for non-existent modules or types. They will
attempt to be imported from the package's main export. This change
currently requires a module map to be generated for the babel-plugin to
use. The map is automatically regenerated for any commit that alters the
entry file of react-native-web.

Fix #822
2018-02-19 13:05:42 -08:00
Nicolas Gallagher
209bd3aee1 [fix] babel-plugin support for 'react-native-web' module name
Now rewrites import/export/require statements from 'react-native-web'.
Install the plugin in the 'benchmarks' package.
2018-01-01 12:01:22 -08:00