At the moment, server-side code is compiled w/ Babel on the fly via @babel/register.
This is usually not recommended for production, as it slows down startup time & general performance, obscures the compiled code output..
A more usual, predictable, though slightly more complex setup than the current one, would be to compile server-side source files with Babel ahead of time, as part of the main build script, and use the compiled server/base.js file to run the server.
bin/server.js & related npm scripts could be left unchanged, except for the removal of @babel/register.
The Babel configuration would need to be tweaked to include dynamic-import-node plugin.
Related to:
At the moment, server-side code is compiled w/ Babel on the fly via @babel/register. This is usually not recommended for production, as it slows down startup time & general performance, obscures the compiled code output..
A more usual, predictable, though slightly more complex setup than the current one, would be to compile server-side source files with Babel ahead of time, as part of the main
build
script, and use the compiledserver/base.js
file to run the server.bin/server.js
& related npm scripts could be left unchanged, except for the removal of@babel/register
. The Babel configuration would need to be tweaked to includedynamic-import-node
plugin.┆Issue is synchronized with this Jira Task