Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以为模块添加别名?
例如我定义了一个模块
define('X')
我想像这样要求它
require(['Y'])
这应该可以解决问题:
require.config({ baseUrl: 'js/', paths: { jquery: 'lib/jquery-1.8.0.min' } , urlArgs: urlArgs }); require( ["jquery"], function() {});