react-google-login
Version:
A Google Login Component for React
42 lines (40 loc) • 820 B
JavaScript
const path = require('path');
const webpack = require('webpack');
module.exports = {
devtool: 'cheap-module-source-map',
entry: [
'./src/index.js',
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'google-login.js',
libraryTarget: 'umd',
library: 'GoogleLogin',
},
module: {
rules: [{
use: 'babel-loader',
test: /\.js$/,
exclude: /node_modules/,
}],
},
externals: {
'react': 'react',
'react-dom': 'ReactDOM',
},
resolve: {
extensions: ['.js'],
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production'),
},
}),
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false,
}),
new webpack.optimize.AggressiveMergingPlugin(),
],
};