I can't get babel to transform my async functions correctly for my Node server. It works fine in development when running nodemon ./src/index.js --exec babel-node babelrc
but when I build it with babel -d ./dist ./src -s
and start it, it throws this error: ReferenceError: regeneratorRuntime is not defined
.
My presets:
{
"presets": ["es2015", "es2017"]
}
What am I missing?
Note: This is not a duplicate. I'm building a server. I'm not using webpack. Trying to use the answers from here won't work.