I installed the following packages:
npm install --save-dev babelify@next @babel/core @babel/preset-env babel-preset-minify
I can successfully browserify my NodeJS Express app with:
./node_modules/browserify/bin/cmd.js src/app.js -o src/bundle.js --node --exclude aws-sdk --transform [ babelify --presets [ "@babel/preset-env" ] ]
But if I try to add minify:
./node_modules/browserify/bin/cmd.js src/app.js -o src/bundle.js --node --exclude aws-sdk --transform [ babelify --presets [ "@babel/preset-env" , babel-preset-minify ] ]
I get:
Error: Cannot find module 'babel-preset-,' from '{projectDir}/' while parsing file: {projectDir}/src/bundle.js
...
The same happens if I change "babel-preset-minify" to just "minify".
What's missing here so I can minify my bundle.js?