Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add es3 support for namespace object import (#2825)
- Loading branch information
1 parent
d24dd8e
commit dee790e
Showing
11 changed files
with
91 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
description: 'properly encodes reserved names if namespace import is used', | ||
options: { | ||
input: ['main.js'] | ||
} | ||
}; |
11 changes: 11 additions & 0 deletions
11
test/form/samples/namespace-object-import/_expected/amd.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,11 @@ | ||
define(function () { 'use strict'; | ||
|
||
var dep = "default"; | ||
|
||
var dep$1 = /*#__PURE__*/Object.freeze({ | ||
'default': dep | ||
}); | ||
|
||
console.log(dep$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,9 @@ | ||
'use strict'; | ||
|
||
var dep = "default"; | ||
|
||
var dep$1 = /*#__PURE__*/Object.freeze({ | ||
'default': dep | ||
}); | ||
|
||
console.log(dep$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,7 @@ | ||
var dep = "default"; | ||
|
||
var dep$1 = /*#__PURE__*/Object.freeze({ | ||
'default': dep | ||
}); | ||
|
||
console.log(dep$1); |
12 changes: 12 additions & 0 deletions
12
test/form/samples/namespace-object-import/_expected/iife.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 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
var dep = "default"; | ||
|
||
var dep$1 = /*#__PURE__*/Object.freeze({ | ||
'default': dep | ||
}); | ||
|
||
console.log(dep$1); | ||
|
||
}()); |
16 changes: 16 additions & 0 deletions
16
test/form/samples/namespace-object-import/_expected/system.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,16 @@ | ||
System.register([], function (exports, module) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
var dep = "default"; | ||
|
||
var dep$1 = /*#__PURE__*/Object.freeze({ | ||
'default': dep | ||
}); | ||
|
||
console.log(dep$1); | ||
|
||
} | ||
}; | ||
}); |
14 changes: 14 additions & 0 deletions
14
test/form/samples/namespace-object-import/_expected/umd.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 @@ | ||
(function (factory) { | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
factory(); | ||
}(function () { 'use strict'; | ||
|
||
var dep = "default"; | ||
|
||
var dep$1 = /*#__PURE__*/Object.freeze({ | ||
'default': dep | ||
}); | ||
|
||
console.log(dep$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 @@ | ||
export default "default" |
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 * as dep from './dep.js'; | ||
|
||
console.log(dep); |