mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-05-09 16:53:16 +08:00
- infer underlying HTML tag from 'accessibilityRole' - move accessibility props to 'CoreComponent' - remove the 'component' prop from exported Components Fix gh-23
40 lines
810 B
JavaScript
40 lines
810 B
JavaScript
var webpack = require('webpack')
|
|
|
|
var DedupePlugin = webpack.optimize.DedupePlugin
|
|
var EnvironmentPlugin = webpack.EnvironmentPlugin
|
|
var OccurenceOrderPlugin = webpack.optimize.OccurenceOrderPlugin
|
|
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin
|
|
|
|
var plugins = [
|
|
new DedupePlugin(),
|
|
new EnvironmentPlugin('NODE_ENV'),
|
|
new OccurenceOrderPlugin()
|
|
]
|
|
|
|
if (process.env.NODE_ENV === 'production') {
|
|
plugins.push(
|
|
new UglifyJsPlugin({
|
|
compress: {
|
|
dead_code: true,
|
|
drop_console: true,
|
|
screw_ie8: true,
|
|
warnings: true
|
|
}
|
|
})
|
|
)
|
|
}
|
|
|
|
module.exports = {
|
|
module: {
|
|
loaders: [
|
|
{
|
|
test: /\.jsx?$/,
|
|
exclude: /node_modules/,
|
|
loader: 'babel-loader',
|
|
query: { cacheDirectory: true }
|
|
}
|
|
]
|
|
},
|
|
plugins: plugins
|
|
}
|