I'm trying to bundle an "express.js" script with esbuild using
esbuild index.js --bundle --platform=node --outfile=server.js
to run as a netlify/aws lambda function and seem always to get this warning:
> node_modules/express/lib/view.js: warning: This call to "require" will not be bundled because the argument is not a string literal
81 │ var fn = require(mod).__express
╵ ~~~~~~~
The function seems to run but I would like to find out what could be wrong and I couldn't find any hints online anywhere?