Frage

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?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top