nexe 是类似pkg 的一个nodejs 应用打包工具

支持的特性

  • 自包含
  • 可以用来运行多nodejs rumtime
  • 不依赖node 以及npm
  • 构建幂等
  • 启动以及部署方便
  • 跨平台

参考使用

  • 安装
npm i nexe -g
  • 简单代码
    app.js

 

console.log("demoapp")
  • 构建
nexe app.js

说明

nexe 使用还是比较简单的,灵活性也很不错,值得试试

参考资料

https:///vercel/pkg
https:///nexe/nexe