当然!
的优化器配置选项是您所需要的dir
。modules
你应该写这样的东西,一个优化器配置文件被输入并乘以缩小的 javascript 文件:
{
// dir is white your temp build files put
dir: 'build-temp-dir',
// one module for one minified javascript file
modules: [{
// module names are relative to baseUrl
name: 'mylib/module-entry1',
// include something else
include: ['mylib/module2']
},
// other one minified javascript file
{
name: 'mylib/module-entry2',
// if you don't want repetitive code put in the two out files
// just exclude it
exclude: ['mylib/module-entry1']
}]
}
请务必检查 requirejs 官方多页演示
和模块配置选项