-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mangle chunk boundaries in compact mode
- Loading branch information
1 parent
93f2b6c
commit aa72b97
Showing
24 changed files
with
163 additions
and
8 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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
description: 'chunking compact and mangled output', | ||
options: { | ||
input: ['main1.js', 'main2.js'], | ||
output: { | ||
compact: true | ||
} | ||
} | ||
}; |
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/chunking-compact/_expected/amd/chunk-1e9855f7.js
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
define(['exports'],function(exports){'use strict';function fn () { | ||
console.log('lib2 fn'); | ||
}function fn$1 () { | ||
fn(); | ||
console.log('dep2 fn'); | ||
}exports.a=fn$1;}); |
8 changes: 8 additions & 0 deletions
8
test/chunking-form/samples/chunking-compact/_expected/amd/main1.js
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
define(['./chunk-1e9855f7.js'],function(__chunk_1){'use strict';function fn () { | ||
console.log('dep1 fn'); | ||
}class Main1 { | ||
constructor () { | ||
fn(); | ||
__chunk_1.a(); | ||
} | ||
}return Main1;}); |
12 changes: 12 additions & 0 deletions
12
test/chunking-form/samples/chunking-compact/_expected/amd/main2.js
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
define(['external','./chunk-1e9855f7.js'],function(external,__chunk_1){'use strict';function fn () { | ||
console.log('lib1 fn'); | ||
external.fn(); | ||
}function fn$1 () { | ||
fn(); | ||
console.log('dep3 fn'); | ||
}class Main2 { | ||
constructor () { | ||
fn$1(); | ||
__chunk_1.a(); | ||
} | ||
}return Main2;}); |
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/chunking-compact/_expected/cjs/chunk-992f09ca.js
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
'use strict';function fn () { | ||
console.log('lib2 fn'); | ||
}function fn$1 () { | ||
fn(); | ||
console.log('dep2 fn'); | ||
}exports.a=fn$1; |
8 changes: 8 additions & 0 deletions
8
test/chunking-form/samples/chunking-compact/_expected/cjs/main1.js
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use strict';var __chunk_1=require('./chunk-992f09ca.js');function fn () { | ||
console.log('dep1 fn'); | ||
}class Main1 { | ||
constructor () { | ||
fn(); | ||
__chunk_1.a(); | ||
} | ||
}module.exports=Main1; |
12 changes: 12 additions & 0 deletions
12
test/chunking-form/samples/chunking-compact/_expected/cjs/main2.js
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict';var external=require('external'),__chunk_1=require('./chunk-992f09ca.js');function fn () { | ||
console.log('lib1 fn'); | ||
external.fn(); | ||
}function fn$1 () { | ||
fn(); | ||
console.log('dep3 fn'); | ||
}class Main2 { | ||
constructor () { | ||
fn$1(); | ||
__chunk_1.a(); | ||
} | ||
}module.exports=Main2; |
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/chunking-compact/_expected/es/chunk-5b60a9d9.js
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
function fn () { | ||
console.log('lib2 fn'); | ||
}function fn$1 () { | ||
fn(); | ||
console.log('dep2 fn'); | ||
}export{fn$1 as a}; |
8 changes: 8 additions & 0 deletions
8
test/chunking-form/samples/chunking-compact/_expected/es/main1.js
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {a as fn}from'./chunk-5b60a9d9.js';function fn$1 () { | ||
console.log('dep1 fn'); | ||
}class Main1 { | ||
constructor () { | ||
fn$1(); | ||
fn(); | ||
} | ||
}export default Main1; |
12 changes: 12 additions & 0 deletions
12
test/chunking-form/samples/chunking-compact/_expected/es/main2.js
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {fn}from'external';import {a as fn$1}from'./chunk-5b60a9d9.js';function fn$2 () { | ||
console.log('lib1 fn'); | ||
fn(); | ||
}function fn$3 () { | ||
fn$2(); | ||
console.log('dep3 fn'); | ||
}class Main2 { | ||
constructor () { | ||
fn$3(); | ||
fn$1(); | ||
} | ||
}export default Main2; |
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/chunking-compact/_expected/system/chunk-ad0e6b97.js
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
System.register([],function(exports,module){'use strict';return{execute:function(){exports('a',fn$1);function fn () { | ||
console.log('lib2 fn'); | ||
}function fn$1 () { | ||
fn(); | ||
console.log('dep2 fn'); | ||
}}};}); |
8 changes: 8 additions & 0 deletions
8
test/chunking-form/samples/chunking-compact/_expected/system/main1.js
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
System.register(['./chunk-ad0e6b97.js'],function(exports,module){'use strict';var fn;return{setters:[function(module){fn=module.a;}],execute:function(){function fn$1 () { | ||
console.log('dep1 fn'); | ||
}class Main1 { | ||
constructor () { | ||
fn$1(); | ||
fn(); | ||
} | ||
} exports('default', Main1);}};}); |
12 changes: 12 additions & 0 deletions
12
test/chunking-form/samples/chunking-compact/_expected/system/main2.js
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
System.register(['external','./chunk-ad0e6b97.js'],function(exports,module){'use strict';var fn,fn$1;return{setters:[function(module){fn=module.fn;},function(module){fn$1=module.a;}],execute:function(){function fn$2 () { | ||
console.log('lib1 fn'); | ||
fn(); | ||
}function fn$3 () { | ||
fn$2(); | ||
console.log('dep3 fn'); | ||
}class Main2 { | ||
constructor () { | ||
fn$3(); | ||
fn$1(); | ||
} | ||
} exports('default', Main2);}};}); |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export function fn () { | ||
console.log('dep1 fn'); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { fn as libfn } from './lib2.js'; | ||
|
||
export function fn () { | ||
libfn(); | ||
console.log('dep2 fn'); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { fn as libfn } from './lib1.js'; | ||
|
||
export function fn () { | ||
libfn(); | ||
console.log('dep3 fn'); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { fn as fn$1 } from 'external'; | ||
|
||
export function fn () { | ||
console.log('lib1 fn'); | ||
fn$1(); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export function fn () { | ||
console.log('lib2 fn'); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { fn } from './dep1.js'; | ||
import { fn as fn2 } from './dep2.js'; | ||
|
||
export default class Main1 { | ||
constructor () { | ||
fn(); | ||
fn2(); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { fn } from './dep2.js'; | ||
import { fn as fn2 } from './dep3.js'; | ||
|
||
export default class Main2 { | ||
constructor () { | ||
fn2(); | ||
fn(); | ||
} | ||
} |
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,3 @@ | ||
'use strict';function _interopDefault(e){return(e&&(typeof e==='object')&&'default'in e)?e['default']:e}var x=_interopDefault(require('external'));function foo () { | ||
console.log( x ); | ||
}module.exports= foo; | ||
}module.exports=foo; |