Open Rush opened 9 years ago
@RushPL Looks like the failure is with wrapShim
, which is fixed with PR #193. Will merge once I get around to it. Let me know if this isn't your problem, and I'll reopen.
Yeah .. wrapShim is one thing, but shouldn't shim deps be passed to r.js as well? Wrap shim is gonna wrap them but it needs the actual dependencies to actually the code in wrapped blocks, if you know what I'm saying.
I think it's both shim
and wrapShim
that need to be passed to it in order to work.
I checked manually by running:
node tmp/requirejs/rjs_driver.js
If I manually make the config mention my dependencies, it works properly:
var requirejs = require("/home/rush/.rvm/gems/ruby-2.1.3/gems/requirejs-rails-0.9.5/bin/r.js")
var baseConfig = {
"baseUrl": "/home/rush/virtkick/webapp/tmp/requirejs/src",
"optimize": "none",
"wrapShim": "true",
"dir": "/home/rush/virtkick/webapp/tmp/requirejs/dst",
"shim": {
"jquery": {
"exports": "jQuery"
},
"jquery_ujs": {
"deps": [
"jquery"
]
},
"bootstrap": [
"jquery",
"jquery_ujs"
],
"twitter/bootstrap/rails/confirm": {
"deps": [
"bootstrap",
"jquery_ujs"
]
},
"novnc/rfb": {
"deps": [
"novnc/util",
"novnc/webutil",
"novnc/base64",
"novnc/websock",
"novnc/des",
"novnc/keysymdef",
"novnc/keyboard",
"novnc/input",
"novnc/display",
"novnc/jsunzip"
]
},
"novnc": {
"deps": [
"novnc/rfb"
],
"exports": "RFB"
}
}
};
baseConfig.modules = [
{
"name": "application"
},
];
requirejs.optimize(baseConfig);
Please reopen the issue.
+1 Shim deps don't work.
+1
Thanks for the reports guys. I'm going to be looking into this in the upcoming week.
I have set up a shim config for my application in
config/requirejs.yml
, such as:but I am not seeing those options passed to r.js, file
tmp/requirejs/rjs_driver.js
contains:What is wrong, is this application bug? How can I make the build_config to be loaded?