Some bug fixes, with the most notable addition is an optimizer option, wrapShim. This will wrap shimmed dependencies in a define() call so that they work better after a build when their upstream dependencies are also AMD modules with dependencies.
The most notable case is probably when using an AMD-aware version of Backbone, but using shim config for scripts that depend on Backbone. If this is your use case, then setting wrapShim: true in the optimizer config will likely fix any post-build problem you might see. More details in the bug ticket.
Full list of changes:
Mainly a maintenance release, and improves some cases when reusing code that was installed via npm. There are two new config options for the loader too:
And for the optimizer, the option can now take an array of file paths that have configs in them. Later values take precedent over earlier values.
Full list of changes:
Full list of changes:
Mainly a maintenance release to fix bugs. There is a new option in require.js to avoid the data-main work, which can be useful for browser extensions that should let the main content page's requirejs handle the data-main.
A small release to fix an optimizer issue with parsing config calls for modifications.
The main changes for this release:
Full list of changes:
has been expanded. Previously, it was just supported for going from minified, bundled code to the unminified, bundled code. If optimize: 'uglify2' is used, it will now go back to the separated, unbundled files.
Source map support is still considered experimental though, so you may find bugs. If you find one, file an r.js issue, ideally with a test case.
Full list of changes:
Biggest change is support for running the optimizer and loading AMD modules in xpcshell. Other than that, just a maintenance release.
Full list of changes:
Quick release for a bug that slipped in the 2.1.3 release in the r.js optimizer. So even though require.js now has a 2.1.4 version, it is the same as 2.1.3, and the optimizer is the same as 2.1.3 except for this one fix:
Without this fix, in some cases 2.1.3 would insert "undefined" in some optimized CSS files, making them unusable.
Maintenance release. A change that may be noticeable:
now correctly generates URLs for string values passed to it without an extension. Previous versions of toUrl() would append a ".js" extension automatically. If you relied on that behavior, when you update to 2.1.3, then you may need to do a code change to append the .js extension yourself:
require.toUrl('some/value') + '.js'The text plugin has been updated to also work with this change, so if you want to generate non-extension paths for text resources, be sure to upgrade to to the 2.0.4 version of text.js.
Normal use of toUrl with a value that has an extension continues to work the same.
Full list of changes:
The big changes for this release are in the optimizer:
Full list of changes:
See the Upgrading to 2.1 page.
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/shenmilingyu/article-5315-2.html
可靠性下降维修成本上升是正常现象