react-with-dimension
Version:
Debounced React high order component to expose container width and height.
39 lines (36 loc) • 710 B
JavaScript
var webpack = require('webpack')
var path = require('path')
module.exports = {
entry: path.resolve(__dirname, './src'),
output: {
path: path.resolve(__dirname, './dist'),
filename: 'bundle.js',
library: 'WithDimension',
libraryTarget: 'umd'
},
externals: {
'react': 'react'
},
module: {
loaders: [
{
test: /src\/.+.js$/,
exclude: /node_modules/,
loader: 'babel'
}
]
},
resolve: {
extensions: ['', '.js', '.jsx']
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
compressor: {
screw_ie8: true,
warnings: false
}
})
]
}