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
In requirejs-rails 0.8.0, I added/documented support for folks doing an r.js build via the gem and using CDNs. One of the cases to be covered was the use of a paths config with URLs in the right-hand side. It occurs to me that I ended up effectively making a policy change to the way r.js works: instead of erroring out on URLs and requiring the build config to explicitly specify empty:, I automatically replace any URLS in paths with empty:. This was mostly in response to the stream of folks who get bit by that on the mailing list and the fact that r.js has no other non-error behavior in this case.
I'm proposing to push this logic up into r.js, turning this issue into a pull request which makes said changes. There are a few ways this could go:
Just change the default, optionally emitting a notice whenever URLs are substituted (one notice per run) to reduce surprise by users.
Leave the current default but add a build config option that globally allows the more friendly behavior. End users thus have less complicated logic when assembling a build config: use the require.js paths config plus one additional "yes, I mean it, I'm really using a CDN" option.
The text was updated successfully, but these errors were encountered:
There is a dev2.0 snapshot update with a fix for this. It prints out a message that it is is skipping an url, and should only do it once per build layer. Feel free to give it a spin and confirm the behavior.
In requirejs-rails 0.8.0, I added/documented support for folks doing an r.js build via the gem and using CDNs. One of the cases to be covered was the use of a paths config with URLs in the right-hand side. It occurs to me that I ended up effectively making a policy change to the way r.js works: instead of erroring out on URLs and requiring the build config to explicitly specify
empty:
, I automatically replace any URLS in paths withempty:
. This was mostly in response to the stream of folks who get bit by that on the mailing list and the fact that r.js has no other non-error behavior in this case.I'm proposing to push this logic up into r.js, turning this issue into a pull request which makes said changes. There are a few ways this could go:
The text was updated successfully, but these errors were encountered: