-
Notifications
You must be signed in to change notification settings - Fork 422
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
v2.2.0 - The included global.define
breaks UMD defs in other scripts
#1544
Comments
I think we went with |
It's for sure not deleting itself. The other CanJS plugins are dependent on it being in place. If I move the delete script up above any of the plugins, they fail with varying errors. If I move the delete script before loading can.fixture.js: <script src="/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/bower_components/canjs/can.jquery.dev.js"></script>
<script src="/bower_components/canjs/can.stache.js"></script>
<script src="/bower_components/canjs/can.map.define.js"></script>
<script src="/bower_components/canjs/can.map.delegate.js"></script>
<script src="/bower_components/canjs/can.list.promise.js"></script>
<script src="/bower_components/canjs/can.list.sort.js"></script>
<script>delete window.define;</script>
<script src="/bower_components/canjs/can.fixture.js"></script> |
I don't understand why each plugin is dependent on it, when each contains the same |
Which is the better practice: loading scripts from a widely-used CDN or bundling them into a larger libs file, say jQuery and CanJS and MomentJS in one file? My guess would be that bundling would be best for creating an independent app, like a PhoneGap project. General web apps would probably benefit more from using the CDN, especially once HTTP2 is in place. Am I off base with my thinking? |
Oh. Probably because it's now missing what appears to be a module cache in |
@marshallswain best practice is not to use the global build :) I think you might have a point though, deleting |
Created stealjs/steal-tools#200 to discuss fixing this issue. I think we do need a global but maybe it can't be |
This has been fixed via stealjs/steal-tools#201 |
In order to use
can.jquery.dev.js
in its current form, I have to deletewindow.define
:If not, because
can.jquery.dev.js
includes the following lines:This breaks any UMD definitions in libraries loaded after CanJS:
The text was updated successfully, but these errors were encountered: