A successful solution for packaging Nestjs #12253
shadowqcom
started this conversation in
Ideas
Replies: 1 comment
-
bun i -g @vercel/ncc |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
测试了一种打包Nestjs项目的方案:
1、使用ncc将nestjs项目及依赖提取出来:
这将在dist目录输出完整版的项目文件,一个已经包含依赖的index.js文件和其他一些必要的文件。
2、使用bun打包 ‘被ncc打包后的文件’
这将生成一个二进制可执行文件。目前我测试在windows11 和 centos9上都正常使用。
测试时使用的是nestjs基础脚手架 没有任何业务代码。
Beta Was this translation helpful? Give feedback.
All reactions