Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
add failing test for default import exportMode check
- Loading branch information
1 parent
f837dd0
commit 4b0b32b
Showing
11 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
test/chunking-form/samples/entry-chunk-export-mode/_config.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 @@ | ||
module.exports = { | ||
description: 'entry chunk export mode checks', | ||
options: { | ||
input: ['main1.js', 'main2.js'] | ||
} | ||
}; |
5 changes: 5 additions & 0 deletions
5
test/chunking-form/samples/entry-chunk-export-mode/_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,5 @@ | ||
define(['./main2.js'], function (main2) { 'use strict'; | ||
|
||
main2(); | ||
|
||
}); |
9 changes: 9 additions & 0 deletions
9
test/chunking-form/samples/entry-chunk-export-mode/_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,9 @@ | ||
define(function () { 'use strict'; | ||
|
||
function fn () { | ||
console.log('main fn'); | ||
} | ||
|
||
return fn; | ||
|
||
}); |
5 changes: 5 additions & 0 deletions
5
test/chunking-form/samples/entry-chunk-export-mode/_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,5 @@ | ||
'use strict'; | ||
|
||
var main2 = require('./main2.js'); | ||
|
||
main2(); |
7 changes: 7 additions & 0 deletions
7
test/chunking-form/samples/entry-chunk-export-mode/_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,7 @@ | ||
'use strict'; | ||
|
||
function fn () { | ||
console.log('main fn'); | ||
} | ||
|
||
module.exports = fn; |
3 changes: 3 additions & 0 deletions
3
test/chunking-form/samples/entry-chunk-export-mode/_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,3 @@ | ||
import fn from './main2.js'; | ||
|
||
fn(); |
5 changes: 5 additions & 0 deletions
5
test/chunking-form/samples/entry-chunk-export-mode/_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,5 @@ | ||
function fn () { | ||
console.log('main fn'); | ||
} | ||
|
||
export default fn; |
14 changes: 14 additions & 0 deletions
14
test/chunking-form/samples/entry-chunk-export-mode/_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,14 @@ | ||
System.register(['./main2.js'], function (exports, module) { | ||
'use strict'; | ||
var fn; | ||
return { | ||
setters: [function (module) { | ||
fn = module.default; | ||
}], | ||
execute: function () { | ||
|
||
fn(); | ||
|
||
} | ||
}; | ||
}); |
13 changes: 13 additions & 0 deletions
13
test/chunking-form/samples/entry-chunk-export-mode/_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,13 @@ | ||
System.register([], function (exports, module) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
exports('default', fn); | ||
function fn () { | ||
console.log('main 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,4 @@ | ||
import fn from './main2.js'; | ||
|
||
|
||
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,3 @@ | ||
export default function fn () { | ||
console.log('main fn'); | ||
} |