支持CommonJS和AMD [英] supporting both CommonJS and AMD
本文介绍了支持CommonJS和AMD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法创建一个javascript微库(没有依赖的库),它支持以下所有模块格式:
Is there a way to create a javascript micro-library (a library that has no dependencies), that support all of the following module formats:
- 异步模块定义
- CommonJS
- 将库的导出公开为全局命名空间对象(无加载程序)
推荐答案
我怀疑你正在寻找的那个是他们所谓的 commonjsStrict.js
I suspect that the one you're looking for is what they're calling "commonjsStrict.js"
这篇关于支持CommonJS和AMD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文