Jump to content
Search Community

navFooh

Members
  • Posts

    1
  • Joined

  • Last visited

navFooh's Achievements

0

Reputation

  1. Hi Manu, I have a similar issue, but unfortunately your fix didn't work for me. Another weird thing is that just a normal shim works for me on Windows, but on a Unix system, the issue persists. What I did figure out is that the AMD setup for require.js might not be correct for some plugins. As you look at the bottom of Draggable.js, you see: //export to AMD/RequireJS and CommonJS/Node (precursor to full modular build system coming at a later date) (function(name) { "use strict"; var getGlobal = function() { return (_gsScope.GreenSockGlobals || _gsScope)[name]; }; if (typeof(define) === "function" && define.amd) { //AMD define(["../TweenLite", "../plugins/CSSPlugin"], getGlobal); } else if (typeof(module) !== "undefined" && module.exports) { //node require("../TweenLite.js"); require("../plugins/CSSPlugin.js"); module.exports = getGlobal(); } }("Draggable")); On line 2276, where the AMD setup is used, it looks for TweenLite one folder up (../). This does not work with r.js setup for me because it tries to look for TweenLite one folder higher than the baseUrl. When using require I always define the paths for my libraries anyway so for me it's not really convient that it uses relative paths. When I change that line to: define(["TweenLite", "CSSPlugin"], getGlobal); and I set the paths for these plugins myself, everything works fine with the optimizer. Anyway I really dislike having to change vendor code since it's not playing well with a Bower setup, so I copy-pasted the plugins to a plugin folder outside the vendor folder.. Don't know if it's totally the same as your issue, but would be great if it can be confirmed if this can or should change. Best, Thijs
×
×
  • Create New...