|
@ -25,8 +25,6 @@ export default class VariableDeclaration extends Node { |
|
|
render ( code, es ) { |
|
|
render ( code, es ) { |
|
|
const treeshake = this.module.bundle.treeshake; |
|
|
const treeshake = this.module.bundle.treeshake; |
|
|
|
|
|
|
|
|
console.group( `rendering ${this}` ) |
|
|
|
|
|
|
|
|
|
|
|
let shouldSeparate = false; |
|
|
let shouldSeparate = false; |
|
|
let separator; |
|
|
let separator; |
|
|
|
|
|
|
|
@ -46,7 +44,6 @@ export default class VariableDeclaration extends Node { |
|
|
if ( declarator.id.type === 'Identifier' ) { |
|
|
if ( declarator.id.type === 'Identifier' ) { |
|
|
const proxy = declarator.proxies.get( declarator.id.name ); |
|
|
const proxy = declarator.proxies.get( declarator.id.name ); |
|
|
const isExportedAndReassigned = !es && proxy.exportName && proxy.isReassigned; |
|
|
const isExportedAndReassigned = !es && proxy.exportName && proxy.isReassigned; |
|
|
console.log( `declarator.init && declarator.init.isMarked`, declarator.init && declarator.init.isMarked ) |
|
|
|
|
|
|
|
|
|
|
|
if ( isExportedAndReassigned ) { |
|
|
if ( isExportedAndReassigned ) { |
|
|
if ( declarator.init ) { |
|
|
if ( declarator.init ) { |
|
@ -93,8 +90,6 @@ export default class VariableDeclaration extends Node { |
|
|
declarator.render( code, es ); |
|
|
declarator.render( code, es ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
console.log( `empty`, empty ) |
|
|
|
|
|
|
|
|
|
|
|
if ( treeshake && empty ) { |
|
|
if ( treeshake && empty ) { |
|
|
code.remove( this.leadingCommentStart || this.start, this.next || this.end ); |
|
|
code.remove( this.leadingCommentStart || this.start, this.next || this.end ); |
|
|
} else { |
|
|
} else { |
|
@ -108,7 +103,5 @@ export default class VariableDeclaration extends Node { |
|
|
this.insertSemicolon( code ); |
|
|
this.insertSemicolon( code ); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
console.groupEnd() |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|