質問

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