如何在节点中加载单个AMD模块?(How to load a single AMD module in node?)

编程入门 行业动态 更新时间:2024-10-22 12:18:29
如何在节点中加载单个AMD模块?(How to load a single AMD module in node?)

我需要使用node.js加载一个AMD模块。

基本上我只需检查该AMD模块中属性的存在。

我想知道节点是否直接提供这种可能性。 如果不是我想知道一个npm包可以帮助完成任务,这不会改变节点加载器(我现在需要一个非常简单的解决方案)。

谢谢

I need to load a single AMD module using node.js.

Basically I need to check only the presence for a property in that AMD module.

I would like to know if node offers this possibility directly. If no I would like to know a npm package which could help on the tasks, which does not change the node loader (I need a very simple solution for now).

Thanks

最满意答案

任何细节都很难回答这么广泛的问题。

查看这些答案中的资源:

从承诺结果导出节点模块 javascript - 为什么有同步和异步模块的规范?

你应该找到你需要的所有信息。

It's hard to answer such a broad question in any details.

See the resources in those answers:

Exporting Node module from promise result javascript - Why is there a spec for sync and async modules?

and you should find all the info you need.

更多推荐

node,AMD,节点,电脑培训,计算机培训,IT培训"/> <meta name="description"

本文发布于:2023-07-28 19:02:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1308159.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:节点   模块   加载   如何在   module

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!