Reorganize modules

This commit is contained in:
Nicolas Gallagher
2015-06-14 23:02:55 -07:00
parent 1ba13f6578
commit cb039d075f
52 changed files with 157 additions and 102 deletions
+23 -1
View File
@@ -1,8 +1,16 @@
var autoprefixer = require('autoprefixer-core');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var localcss = require('postcss-modules-local-by-default');
var webpack = require('webpack');
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
module.exports = {
entry: {
main: './src/index'
},
externals: [{
react: true
}],
module: {
loaders: [
{
@@ -20,8 +28,22 @@ module.exports = {
}
]
},
output: {
filename: 'main.js',
library: 'ReactWebSDK',
libraryTarget: 'commonjs2',
path: './dist'
},
plugins: [
new ExtractTextPlugin('react-web-sdk.css')
new ExtractTextPlugin('react-web-sdk.css'),
new UglifyJsPlugin({
compress: {
dead_code: true,
drop_console: true,
screw_ie8: true,
warnings: true
}
})
],
postcss: [ autoprefixer ]
};