Moleculer v0.14.21 Release Notes
Release Date: 2022-04-30 // almost 2 years ago-
20 commits from 2 contributors.
👍 ESM support #1063
This version contains an ESM-based Moleculer Runner. This Runner is able to load ESM configuration file and ESM services. It can load the CJS services, as well
Example usage
moleculer-runner-esm --repl services/**/*.service.mjs
Moreover, the
index.js
file is wrapped intoindex.mjs
, so you can import internal modules from the core in ESM modules. E.g.:import { ServiceBroker, Errors } from "moleculer";
Please note, the hot-reload function doesn't work with this ESM Runner. The cause: https://github.com/nodejs/modules/issues/307 Node maintainers try to solve the missing features (module cache and module dependency tree) with loaders but this API is not stable yet.
Other Changes
broker.stopping
property is created to indicate that broker is in stopping state.