Reorganize karma and webpack configs

This commit is contained in:
Nicolas Gallagher
2016-03-10 08:52:37 -08:00
parent 83e4c68461
commit c589d79035
6 changed files with 17 additions and 27 deletions
+33
View File
@@ -0,0 +1,33 @@
var webpack = require('webpack')
const DIST_DIRECTORY = './dist'
module.exports = {
entry: {
main: DIST_DIRECTORY
},
externals: [{
'react': true,
'react-dom': true,
'react-dom/server': true
}],
output: {
filename: 'react-native-web.js',
library: 'ReactNativeWeb',
libraryTarget: 'umd',
path: DIST_DIRECTORY
},
plugins: [
new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') }),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
dead_code: true,
drop_console: true,
screw_ie8: true,
warnings: true
}
})
]
}