我的项目结构非常复杂,它是 jsp/js/css 文件的混合体。
在 build.js 中,我使用“dir”和“modules”,输出文件夹包含从 baseUrl 开始的所有内容,它包含数千个文件和文件夹,但我只需要在“modules”指令中指定的少量构建层文件,
有没有办法不将非构建层文件复制到“dir”文件夹中?
迟到的答案,但您可以尝试 removeCombined 选项。见https://github.com/jrburke/r.js/blob/master/build/example.build.js#L349
以下是上述网址的片段
//If set to true, any files that were combined into a build bundle will be
//removed from the output folder.
removeCombined: false,