(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.VueAnimatedList = factory());
}(this, function () {
'use strict';
//...
}));
就是判断环境,用commonJS方案(比如nodejs)加载还是amd的方案加载(比如seajs)。
具体可以参看这篇文章,可能对你有帮助~
学习模块化规范和打包工具