浏览代码

Use lodash.noConflict for underscore

JC Brand 8 年之前
父节点
当前提交
c7d66377d0
共有 2 个文件被更改,包括 3 次插入4 次删除
  1. 1 2
      src/config.js
  2. 2 2
      src/underscore-shim.js

+ 1 - 2
src/config.js

@@ -175,8 +175,7 @@ require.config({
         '*': {
             'jquery': 'jquery.noconflict',
             'backbone': 'backbone.noconflict',
-            'lodash': 'lodash.noconflict',
-            'underscore': 'lodash.noconflict'
+            'lodash': 'lodash.noconflict'
          },
         // '*.noconflict' wants the real module
         // If this line was not here, there would

+ 2 - 2
src/underscore-shim.js

@@ -1,4 +1,4 @@
 /*global define */
-define('underscore', ['lodash'], function (_) {
-    return _;
+define(['lodash'], function (_) {
+    return _.noConflict();
 });