Files
react-native-web/webpack.config.js
Nicolas Gallagher f33312a4dd [change] Use animatedjs/animated
Depend on 'animatedjs/animated' for the Animation implementation. This
patch also replaces 'es6-set' with a small shim to reduce impact on
production bundle size.

Fix #95
2016-06-23 15:10:43 -07:00

35 lines
845 B
JavaScript

const path = require('path')
const webpack = require('webpack')
const DIST_DIRECTORY = './dist'
module.exports = {
entry: {
main: DIST_DIRECTORY
},
output: {
filename: 'ReactNative.js',
library: 'ReactNative',
libraryTarget: 'umd',
path: DIST_DIRECTORY
},
plugins: [
new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') }),
new webpack.optimize.DedupePlugin(),
// https://github.com/animatedjs/animated/issues/40
new webpack.NormalModuleReplacementPlugin(
/es6-set/,
path.join(__dirname, 'src/modules/polyfills/Set.js')
),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
dead_code: true,
drop_console: true,
screw_ie8: true,
warnings: true
}
})
]
}