The server part now uses ES modules (ESM). To enforce ESM on the server level, a new package.json with "type": "module" is used. For now, it is not possible to enforce ESM on the root level without breaking the client build, i.e. due to poi. The config/server folder is also switched to ESM.
Database migrations and seeds are for now left as CommonJS, as the umzug, the tool that executes them, uses require. The preflight script currently must also stay as CommonJS, since it is used with the -r flag which explicitly uses require, there will be an alternative in the future Node versions.
The server part now uses ES modules (ESM). To enforce ESM on the server level, a new
package.json
with"type": "module"
is used. For now, it is not possible to enforce ESM on the root level without breaking the client build, i.e. due to poi. Theconfig/server
folder is also switched to ESM. Database migrations and seeds are for now left as CommonJS, as the umzug, the tool that executes them, uses require. The preflight script currently must also stay as CommonJS, since it is used with the-r
flag which explicitly uses require, there will be an alternative in the future Node versions.