Refactor dev workflow

This commit is contained in:
Nicolas Gallagher
2015-09-08 23:29:31 -07:00
parent 114fb5f8c7
commit eada8e7fc7
15 changed files with 110 additions and 96 deletions
-34
View File
@@ -1,34 +0,0 @@
var assign = require('object-assign')
var base = require('./webpack-base.config.js')
var webpack = require('webpack')
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin
var plugins = []
if (process.env.NODE_ENV === 'production') {
plugins.push(
new UglifyJsPlugin({
compress: {
dead_code: true,
drop_console: true,
screw_ie8: true,
warnings: true
}
})
)
}
module.exports = assign({}, base, {
entry: {
main: './src/index'
},
externals: [{
react: true
}],
output: {
filename: 'react-native-web.js',
library: 'ReactNativeWeb',
libraryTarget: 'commonjs2',
path: './dist'
},
plugins: plugins
})