首先是一些代码:
我运行的 r.js 启动文件r.js.cmd -o static/js/boot.js
({
baseUrl: './',
preserveLicenseComments: false,
name: 'boot',
stubModules: ['text'],
mainConfigFile: './requirejs/config.js',
out: 'build.min.js',
//paths: {
// 'text': 'plugins/requirejs.text'
//},
})
然后插件在控制台中抛出异常:
Error: Error: Loader plugin did not call the load callback in the build:
text:
text!langJSON: Error: ENOENT, no such file or directory 'C:\web\lang\main'
text!/web/downloads/links.json: Error: ENOENT, no such file or directory 'C:\web\downloads\links.json'
有人可以回答我为什么 r.js 评估“文本”插件,尽管在构建配置文件属性中使用“stubModules”参数?
我以前读过这篇文章:
提前致谢。