Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression of #163, automatic use of empty: for CDN URLs #400

Closed
jwhitley opened this issue Mar 8, 2013 · 6 comments
Closed

Regression of #163, automatic use of empty: for CDN URLs #400

jwhitley opened this issue Mar 8, 2013 · 6 comments

Comments

@jwhitley
Copy link
Contributor

jwhitley commented Mar 8, 2013

A user of requirejs-rails has noted what appears to be a regression of a change introduced in #163, to automatically treat URLs as empty: in build configs. See jwhitley/requirejs-rails#87 for details. Let me know if I can be of any help in reproducing, etc.

@jrburke
Copy link
Member

jrburke commented Mar 11, 2013

Asked for more info in the original ticket, not clear yet to me what is going wrong.

@pboling
Copy link

pboling commented Jun 13, 2013

This is a problem for me. CDN assets are not working with require JS. Particularly following the Facebook instructions for using the JDK with Require:
http://developers.facebook.com/docs/javascript/howto/requirejs/

@jrburke
Copy link
Member

jrburke commented Jun 14, 2013

@pboling do you have a sample or test I can try? Preferably something where I do not have to run requirejs-rails as I do not have that set up.

Perhaps if you could pass me a simple module that uses the facebook sdk, the runtime requirejs.config you use in the browser, then the build config that is passed to r.js I could try to reproduce a test case using just r.js directly.

@pboling
Copy link

pboling commented Jun 15, 2013

I'll work on getting a simple example setup, assuming I am able to reproduce the issue outside of requirejs-rails.

@pboling
Copy link

pboling commented Jul 11, 2013

My problem seems to be a result of using almond to build my main.js, and almond not supporting CDN/external files.

@jrburke
Copy link
Member

jrburke commented Jul 11, 2013

OK, yes, you can just build with require.js in that case instead of almond. You will need to set up a paths config though, and call the library something other than 'require', since 'require' is a reserved dependency name. Calling it anything else is fine, see second code snippet here for an example:

http://requirejs.org/docs/optimization.html#onejs

@jrburke jrburke closed this as completed Jul 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants