import bodyParser from "koa-body";
var crypto = require('crypto');
^
TypeError: require is not a function
{
"presets": ["@babel/preset-env","@babel/preset-react"]
}
rules: [
{
test: /\.(m?js|jsx)$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader'
}
}
]