0.4.3 • Published 4 years ago

@gotoeasy/browserify v0.4.3

Weekly downloads
18
License
MIT
Repository
github
Last release
4 years ago

@gotoeasy/browserify

使用固定配置让browserify转译代码,简化满足特定需求:把含require的代码转成能在浏览器上运行的代码

NPM version License

Sample

const browserify = require('@gotoeasy/browserify');

let code = `
"use strict";

require("core-js/modules/es6.string.starts-with");

var flg = 'abc'.startsWith('a');
`;

(async function(){
    let rs = await browserify(code, './'); // 在当前目录查找补丁模块
    console.info(rs);
})();



// 转译结果如下
/*
(function(){function r(e,n,t)...
   ...
   ...
   ...
},{"./_export":9,"./_fails-is-regexp":10,"./_string-context":23,"./_to-length":25}],30:[function(require,module,exports){

"use strict";

require("core-js/modules/es6.string.starts-with");

var flg = 'abc'.startsWith('a');

},{"core-js/modules/es6.string.starts-with":29}]},{},[30]);
*/

Links

0.4.3

4 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.3.0

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.1.2

5 years ago

0.2.1

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago