You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to optimize your app with r.js the optimizer fails when you include css! requires. The plugin should at least somehow silently do nothing on r.js runs instead of failing them. Later one could implement actual CSS packaging as well.
Tracing dependencies for: application
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
ReferenceError: document is not defined
at Function.<anonymous> (eval at <anonymous> (/Users/samuelvogel/Viison/Workspace/GigalocalAdmin/r.js:7467:25))
at Function.load (/Users/samuelvogel/Viison/Workspace/GigalocalAdmin/r.js:7467:25)
at loadPaused (/Users/samuelvogel/Viison/Workspace/GigalocalAdmin/r.js:1144:25)
at /Users/samuelvogel/Viison/Workspace/GigalocalAdmin/r.js:1186:25
at Object.completeLoad (/Users/samuelvogel/Viison/Workspace/GigalocalAdmin/r.js:1452:17)
at Function.load (/Users/samuelvogel/Viison/Workspace/GigalocalAdmin/r.js:7470:33)
at loadPaused (/Users/samuelvogel/Viison/Workspace/GigalocalAdmin/r.js:1144:25)
at /Users/samuelvogel/Viison/Workspace/GigalocalAdmin/r.js:1186:25
at Object.completeLoad (/Users/samuelvogel/Viison/Workspace/GigalocalAdmin/r.js:1452:17)
at Function.load (/Users/samuelvogel/Viison/Workspace/GigalocalAdmin/r.js:7470:33)
The text was updated successfully, but these errors were encountered:
The problem is caused by referencing document in the outer function call.
Wrapping everything in if(typeof document != 'undefined') {...} solves this, and makes the plugin be ignored by r.js.
Obviously it would be nicer to restructure the code by some other means.
When trying to optimize your app with
r.js
the optimizer fails when you includecss!
requires. The plugin should at least somehow silently do nothing onr.js
runs instead of failing them. Later one could implement actual CSS packaging as well.The text was updated successfully, but these errors were encountered: