简体   繁体   English

自定义NodeJS构建,包括javascript模块

[英]Custom NodeJS build including javascript modules

is it somehow possible to build NodeJS together with some selected JavaScript modules? 是否可以以某种方式与某些选定的JavaScript模块一起构建NodeJS? I believe that for native modules, I should be able to achieve this with node-gyp, but I have no idea how to do this for JavaScript modules. 我相信对于本机模块,我应该能够通过node-gyp实现此目的,但是我不知道如何为JavaScript模块执行此操作。 The main idea is to be able to use custom application without npm install. 主要思想是无需使用npm安装即可使用自定义应用程序。

I know that I can use any of the bundlers like pkg or nexe, but this has some drawbacks with respect to the development... 我知道我可以使用任何打包程序,例如pkg或nexe,但这在开发方面有一些缺点...

Thanks! 谢谢!

You can include JS files as described in here . 您可以按照此处所述包含JS文件。

Just add a link-module parameter. 只需添加一个链接模块参数。

> .\vcbuild link-module './myCustomModule.js'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM