Closed laggingreflex closed 10 years ago
Following works like it should:
require(['jquery', 'angular', 'controller'], function($, angular) {...
It looks for jquery in the correct path as specified in path alias. ('/lib/jquery/jquery' etc)
'/lib/jquery/jquery'
This doesn't work:
var require_dependencies = ['jquery', 'angular', 'controller']; require(require_dependencies, function($, angular) {...
This makes requests for http://localhost/jquery (which doesn't exist), essentially disregarding my path aliases.
http://localhost/jquery
I'm guessing that either grunt task (or requireJS optimizer) doesn't resolve the array variable require_dependencies before outputting.
require_dependencies
This task is just a thin wrapper for RJS. Try opening a ticket there instead.
Following works like it should:
It looks for jquery in the correct path as specified in path alias. (
'/lib/jquery/jquery'
etc)This doesn't work:
This makes requests for
http://localhost/jquery
(which doesn't exist), essentially disregarding my path aliases.I'm guessing that either grunt task (or requireJS optimizer) doesn't resolve the array variable
require_dependencies
before outputting.