underscore是一个很有用的js工具库,但是好像默认不支持seajs模块化

新建一个文件例如叫做xx.js 谈后,键入

define(function(require,exports,module) {

    这里将underscore源代码复制进来

});

 

 

这样在使使用时 

var _ = require('lib/xx');

 console.info(_.VERSION);

 

就可以了,

相关文章:

  • 2021-07-10
  • 2021-05-28
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
猜你喜欢
  • 2021-10-30
  • 2021-08-19
  • 2022-12-23
  • 2021-09-27
  • 2021-07-15
  • 2021-09-12
相关资源
相似解决方案