redux-devtools/packages/map2tree/webpack.config.umd.js

24 lines
489 B
JavaScript
Raw Permalink Normal View History

2019-01-09 03:06:21 +03:00
const path = require('path');
2019-01-10 21:51:14 +03:00
module.exports = (env = {}) => ({
mode: env.production ? 'production' : 'development',
2019-01-10 21:51:14 +03:00
entry: {
app: ['./src/index.js'],
2019-01-10 21:51:14 +03:00
},
output: {
library: 'd3tooltip',
libraryTarget: 'umd',
path: path.resolve(__dirname, 'dist'),
filename: env.production ? 'map2tree.min.js' : 'map2tree.js',
2019-01-10 21:51:14 +03:00
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
],
2019-01-10 21:51:14 +03:00
},
});