문제

With r.js if I enter the following on the command line exclude=bootstrap the expected results are obtained. However, if i enter exclude=['bootstrap', 'jquery'] the following error occurs:

Tracing dependencies for: ['bootstrap'
Error: Error: ENOENT, no such file or directory    'c:\users\justin\appdata\local\temp\tmpnojtra\core\js\['bootstrap'.js'

Clearly the array is not being parsed correctly by r.js, so i wonder if there is another syntax required to allow multiple includes/excludes or it's just not possible?

도움이 되었습니까?

해결책

It uses an unexpected syntax. See this message from RequireJS's author. Basically, you remove the brackets, spaces, string quotes that you'd put in the JavaScript, and what remains is what you put on the command line.

In your case exclude=bootstrap,jquery should do the trick.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top