Commit d28fc4be authored by rockyl's avatar rockyl

删除tslib

parent 3c397938
......@@ -133,12 +133,12 @@ class CustomManager {
this.pool.push(custom);
}
generate(){
generate() {
let scripts = '';
for(let {id, code} of this.pool){
for (let {id, code} of this.pool) {
scripts += `
/*=====START ${id} START=====*/
module = {
var module = {
exports: {}
};
(function(module){
......@@ -151,7 +151,14 @@ exports['${id}'] = module.exports;
return `
(function(){
var exports = {};
var module;
function require(id){
if(id === 'tslib'){
return window['tslib']
}else{
console.log('missing require', id);
}
}
${scripts}
......
This diff is collapsed.
......@@ -139,12 +139,12 @@ class CustomManager {
this.pool.push(custom);
}
generate(){
generate() {
let scripts = '';
for(let {id, code} of this.pool){
for (let {id, code} of this.pool) {
scripts += `
/*=====START ${id} START=====*/
module = {
var module = {
exports: {}
};
(function(module){
......@@ -157,7 +157,14 @@ exports['${id}'] = module.exports;
return `
(function(){
var exports = {};
var module;
function require(id){
if(id === 'tslib'){
return window['tslib']
}else{
console.log('missing require', id);
}
}
${scripts}
......
This diff is collapsed.
......@@ -139,12 +139,12 @@ ${scripts}
this.pool.push(custom);
}
generate(){
generate() {
let scripts = '';
for(let {id, code} of this.pool){
for (let {id, code} of this.pool) {
scripts += `
/*=====START ${id} START=====*/
module = {
var module = {
exports: {}
};
(function(module){
......@@ -157,7 +157,14 @@ exports['${id}'] = module.exports;
return `
(function(){
var exports = {};
var module;
function require(id){
if(id === 'tslib'){
return window['tslib']
}else{
console.log('missing require', id);
}
}
${scripts}
......
This diff is collapsed.
......@@ -2,6 +2,7 @@
"name": "zeroing-code-divider",
"version": "1.0.0",
"main": "dist/index.js",
"module": "dist/index.es.js",
"license": "MIT",
"dependencies": {
......
......@@ -11,12 +11,12 @@ export default class CustomManager {
this.pool.push(custom);
}
generate(){
generate() {
let scripts = '';
for(let {id, code} of this.pool){
for (let {id, code} of this.pool) {
scripts += `
/*=====START ${id} START=====*/
module = {
var module = {
exports: {}
};
(function(module){
......@@ -29,7 +29,14 @@ exports['${id}'] = module.exports;
return `
(function(){
var exports = {};
var module;
function require(id){
if(id === 'tslib'){
return window['tslib']
}else{
console.log('missing require', id);
}
}
${scripts}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment