reliance-react-checkbox-tree
Version:
Fork of checkbox tree in React by Jake Zatecky: https://github.com/jakezatecky/react-checkbox-tree.
48 lines (45 loc) • 1.16 kB
JavaScript
function makeConfig(target) {
const fileMap = {
node: 'index.js',
web: 'index.browser.js',
};
return {
mode: 'production',
target,
output: {
filename: fileMap[target],
library: {
name: 'ReactCheckboxTree',
type: 'umd',
},
},
externals: [
{
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react',
},
},
{
'react-dom': {
root: 'ReactDOM',
commonjs2: 'react-dom',
commonjs: 'react-dom',
amd: 'react-dom',
},
},
],
module: {
rules: [
{
test: /\.js?$/,
exclude: /(node_modules)/,
loader: 'babel-loader',
},
],
},
};
}
module.exports = makeConfig;