Repository URL to install this package:
|
Version:
0.0.3 ▾
|
@doodle/geolocation
/
webpack.config.js
|
|---|
const webpack = require('webpack');
const path = require('path');
const config = {
entry: path.resolve(__dirname, 'src', 'index.js'),
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
libraryTarget: 'commonjs2',
},
externals: {
'fetch-everywhere': 'commonjs2 fetch-everywhere',
},
module: {
loaders: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'react', 'stage-2'],
plugins: ['transform-object-rest-spread', 'transform-class-properties', 'transform-runtime'],
},
},
],
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
},
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
},
}),
],
};
module.exports = config;