ExtensionEngine / tailor

Content authoring platform
MIT License
31 stars 10 forks source link

Switch server to ESM #1070

Closed droguljic closed 1 year ago

droguljic commented 1 year ago

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.