react-handy-hooks
Version:
Set of useful react hooks
46 lines (41 loc) • 743 B
JavaScript
const path = require('path');
const PATHS = {
src: path.join(__dirname, 'src'),
build: path.join(__dirname, 'dist'),
};
const reactExternal = {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react',
};
const prodConfig = {
mode: 'production',
devtool: 'source-map',
entry: [
PATHS.src,
],
output: {
path: PATHS.build,
filename: 'index.js',
publicPath: '/',
library: 'reactHandyHooks',
libraryTarget: 'umd',
umdNamedDefine: true,
},
module: {
rules: [
{
test: /\.(js)$/,
use: 'babel-loader',
exclude: [
/node_modules/,
],
},
],
},
externals: {
react: reactExternal,
},
};
module.exports = prodConfig;