-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Terser syntax for exporting identifiers (#263)
* Terser syntax for exporting identifiers * Minify Import Statements (#265) * Import minification * Remove unneccessary casting storage * Increase test coverage for new import minification
- Loading branch information
1 parent
09254e4
commit 71fb830
Showing
17 changed files
with
90 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
function bar(){console.log(1)};function baz(a){console.log(a)};var foo=1;export{bar,baz,foo}; | ||
class b{constructor(a){this.a=a}console(){console.log(this.a)}}function bar(){console.log(1)};function baz(a){console.log(a)};var foo=1;export{b as ExportedClass,bar,baz,foo}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
function bar(){console.log(1)};function baz(a){console.log(a)};var foo=1;export{bar,baz,foo}; | ||
class b{constructor(a){this.name_=a}console(){console.log(this.name_)}}function bar(){console.log(1)};function baz(a){console.log(a)};var foo=1;export{b as ExportedClass,bar,baz,foo}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
function bar(){console.log(1)};function baz(a){console.log(a)};var foo=1;export{bar,baz,foo}; | ||
function b(a){this.name_=a}b.prototype.console=function(){console.log(this.name_)};function bar(){console.log(1)};function baz(a){console.log(a)};var foo=1;export{b as ExportedClass,bar,baz,foo}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
class a{constructor(b){this.a=b}console(){console.log(this.a)}}export var Exported=a; | ||
class a{constructor(b){this.a=b}console(){console.log(this.a)}}export{a as Exported}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
class a{constructor(b){this.name_=b}console(){console.log(this.name_)}}export var Exported=a; | ||
class a{constructor(b){this.name_=b}console(){console.log(this.name_)}}export{a as Exported}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
function a(b){this.name_=b}a.prototype.console=function(){console.log(this.name_)};export var Exported=a; | ||
function a(b){this.name_=b}a.prototype.console=function(){console.log(this.name_)};export{a as Exported}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
import _ from 'lodash';console.log("lodash",_); | ||
import j from 'lodash3';import {thing,thing2} from 'lodash2';import _,{foo,bar} from 'lodash';console.log("lodash",_,foo,bar,thing,thing2,j); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
import _ from 'lodash';console.log("lodash",_); | ||
import j from 'lodash3';import {thing,thing2} from 'lodash2';import _,{foo,bar} from 'lodash';console.log("lodash",_,foo,bar,thing,thing2,j); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
import _ from 'lodash';console.log("lodash",_); | ||
import j from 'lodash3';import {thing,thing2} from 'lodash2';import _,{foo,bar} from 'lodash';console.log("lodash",_,foo,bar,thing,thing2,j); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import _ from 'lodash'; | ||
import _, { foo, bar as baz } from 'lodash'; | ||
import {thing, thing2 as thing3} from 'lodash2'; | ||
import j from 'lodash3'; | ||
|
||
console.log('lodash', _); | ||
console.log('lodash', _, foo, baz, thing, thing3, j); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
class a{constructor(b){this.a=b}console(){console.log(this.a)}}export var ExportThis=a; | ||
class a{constructor(b){this.a=b}console(){console.log(this.a)}}export{a as ExportThis}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
class a{constructor(b){this.name_=b}console(){console.log(this.name_)}}export var ExportThis=a; | ||
class a{constructor(b){this.name_=b}console(){console.log(this.name_)}}export{a as ExportThis}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
function a(b){this.name_=b}a.prototype.console=function(){console.log(this.name_)};export var ExportThis=a; | ||
function a(b){this.name_=b}a.prototype.console=function(){console.log(this.name_)};export{a as ExportThis}; |