Haxe node js拆分js,而不是一个js

Haxe nodejs split js, insted of one js

在使用 Haxe nodejs 目标时,如何生成分离的 js 文件? 现在我有一个大的 js 文件,但我想将每个 class 编译为单独的 js 文件。 我找到了 modular-js,但如果我觉得不错,这不适用于 nodejs(因为 AMD),仅适用于前端 js。

谢谢

你见过hxgenjs吗?它声称支持 Node.js:

The default configuration emits one javascript file per Haxe class, and uses CommonJS (require()) to link the dependencies. It should work out of the box with your current Node.js project, React Native project or any other CommonJS-compatible runtimes.