mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-29 12:54:53 +08:00
[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:
@@ -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'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user