Initial test framework setup

This commit is contained in:
Nicolas Gallagher
2015-09-01 14:44:42 -07:00
parent d3dce675df
commit 92dbadacb5
5 changed files with 96 additions and 27 deletions
+7 -26
View File
@@ -1,40 +1,22 @@
var autoprefixer = require('autoprefixer-core');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var assign = require('object-assign');
var base = require('./webpack-base.config.js');
var webpack = require('webpack');
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
module.exports = {
module.exports = assign({}, base, {
entry: {
main: './src/index'
},
externals: [{
react: true
}],
module: {
loaders: [
{
test: /\.css$/,
loader: ExtractTextPlugin.extract(
'style-loader',
'css-loader?module&localIdentName=[hash:base64:5]!postcss-loader'
)
},
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: { cacheDirectory: true }
}
]
},
output: {
filename: 'main.js',
library: 'ReactWebSDK',
filename: 'react-native-web.js',
library: 'ReactNativeWeb',
libraryTarget: 'commonjs2',
path: './dist'
},
plugins: [
new ExtractTextPlugin('react-web-sdk.css'),
new UglifyJsPlugin({
compress: {
dead_code: true,
@@ -43,6 +25,5 @@ module.exports = {
warnings: true
}
})
],
postcss: [ autoprefixer ]
};
]
});