redux-devtools/packages/react-json-tree/webpack.config.umd.js
Nathan Bierema fa1aa952a6
chore(*): upgrade dependencies (#574)
* ramda

* open

* react-icons

* semver

* uuid

* terser-webpack-plugin

* socketcluster-client

* yarn.lock

* More

* Revert "More"

This reverts commit 84f092b7e0.

* Fix

* snapshot
2020-08-08 21:18:45 -04:00

39 lines
801 B
JavaScript

const path = require('path');
module.exports = (env = {}) => ({
mode: env.production ? 'production' : 'development',
entry: {
app: ['./src/index.js'],
},
output: {
library: 'ReactJsonTree',
libraryExport: 'default',
libraryTarget: 'umd',
path: path.resolve(__dirname, 'umd'),
filename: env.production ? 'react-json-tree.min.js' : 'react-json-tree.js',
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
],
},
externals: {
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react',
},
'react-dom': {
root: 'ReactDOM',
commonjs2: 'react-dom',
commonjs: 'react-dom',
amd: 'react-dom',
},
},
});