Skip to content

Commit

Permalink
clean up webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
romeovs authored and Erin Doyle committed Oct 15, 2017
1 parent cbda7a0 commit a034a28
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions webpack.config.js
@@ -1,10 +1,10 @@
var webpack = require('webpack');
var webpack = require('webpack')

var plugins = [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production')
})
];
]

if (process.env.COMPRESS) {
plugins.push(
Expand All @@ -13,30 +13,29 @@ if (process.env.COMPRESS) {
warnings: false
}
})
);
)
}

module.exports = {

output: {
library: 'ReactJS.A11y',
libraryTarget: 'var'
},

externals: process.env.NODE_DIST ? {} : {
entry: './lib/index.js'
, output: {
filename: 'react-a11y.js'
, path: './dist'
, library: 'A11y'
, libraryTarget: 'var'
}
, externals: process.env.NODE_DIST ? {} : {
react: 'React'
},

node: {
}
, node: {
buffer: false
},

plugins: plugins,

module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' }
]
}

};
, plugins: plugins
, module: {
loaders: [{
test: /\.js$/
, exclude: /node_modules/
, loader: 'babel-loader'
}]
}
}

0 comments on commit a034a28

Please sign in to comment.