react-simpler-forms
Version:
React Higher Order component that manages all of your forms state along with other components that make it easy to create, validate, perform search queries, and submit single or multi-step forms.
52 lines (50 loc) • 1.05 kB
JavaScript
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const path = require('path');
module.exports = (env) => {
return {
entry: [
'./src/index'
],
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'commonjs2',
publicPath: '/dist/'
},
optimization: {
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
mangle: true,
},
cache: true,
parallel: true,
sourceMap: true
})
]
},
module: {
rules: [
{
test: /\.(js)$/,
exclude: /(node_modules)/,
loader: 'babel-loader'
}
]
},
externals: {
react: {
commonjs: "react",
commonjs2: "react",
amd: "React",
root: "React"
},
"react-dom": {
commonjs: "react-dom",
commonjs2: "react-dom",
amd: "ReactDOM",
root: "ReactDOM"
}
}
}
}