node.js - haxe node js 拆分js,而不是一个js

标签 node.js haxe

使用 Haxe Nodejs 目标时如何生成单独的 js 文件? 现在我有一个大的 js 文件,但我想将每个类编译为单独的 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.

关于node.js - haxe node js 拆分js,而不是一个js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46025853/

相关文章:

c++ - 如何在 Haxe 中使用 C/C++ 库(如 NCurses)

sqlite - Haxe-Android目标中的SQLite崩溃

python - 如何在使用 Haxe 构建的 Flask 服务器中返回 JSON

sql-server - 运行 node-mssql 查询时出错

javascript - Nodejs crypto.getHashes() 返回一个空数组

javascript - NodeJS 等待异步函数完成 foreach

mysql - 重复输入虽然一切都按预期工作

haxe - 裸包声明的目的是什么?它有什么作用?

macros - Haxe 宏调用类的静态方法

node.js - 当我更改 wifi 网络时,Socket.io 连接不上