运行 RequireJS 优化器时遇到问题...我在主配置文件中定义了以下内容:
require.config({
config: {
bootstrap: {
autoload: true
}
},
...
}
然后在我的bootstrap.js
文件中我这样做:
define(['module', 'app'], function (module, App) {
'use strict';
console.log(module.config().autoload);
...
});
但是autoload
是undefined
:( 但是,该变量在非优化版本中可用。
我已经尝试过使用其他模块和其他变量,但基本上没有模块配置被推送到 Require 的优化器的输出文件中。
这是预期的行为吗?