mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-22 14:21:44 +00:00
Reorganize modules
This commit is contained in:
+23
-1
@@ -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 ]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user