[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.
This commit is contained in:
Nicolas Gallagher
2018-05-18 15:12:18 -07:00
parent 96c3f09fac
commit 004c7ce478
4 changed files with 14 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ module.exports = {
options: {
cacheDirectory: false,
presets: babelPreset,
plugins: ['react-native-web', 'styled-jsx/babel']
plugins: ['styled-jsx/babel']
}
}
}
@@ -43,5 +43,10 @@ module.exports = {
analyzerMode: 'static',
openAnalyzer: false
})
]
],
resolve: {
alias: {
'react-native': 'react-native-web'
}
}
};