Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalize hook to handle all occurrences of
import.meta
- Loading branch information
1 parent
fc21284
commit 057ecda
Showing
14 changed files
with
96 additions
and
53 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
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,9 +1,15 @@ | ||
define(['module'], function (module) { 'use strict'; | ||
|
||
console.log('resolved'); | ||
console.log('resolved'); | ||
console.log('resolved'); | ||
|
||
console.log(new URL(module.uri, document.baseURI).href); | ||
console.log(undefined); | ||
console.log(({ url: new URL(module.uri, document.baseURI).href })); | ||
|
||
console.log('amd.js/configure-import-meta-url/main.js'); | ||
console.log('url=amd.js:configure-import-meta-url/main.js'); | ||
console.log('privateProp=amd.js:configure-import-meta-url/main.js'); | ||
console.log('null=amd.js:configure-import-meta-url/main.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 |
---|---|---|
@@ -1,7 +1,13 @@ | ||
'use strict'; | ||
|
||
console.log('resolved'); | ||
console.log('resolved'); | ||
console.log('resolved'); | ||
|
||
console.log((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('cjs.js', document.baseURI).href))); | ||
console.log(undefined); | ||
console.log(({ url: (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('cjs.js', document.baseURI).href)) })); | ||
|
||
console.log('cjs.js/configure-import-meta-url/main.js'); | ||
console.log('url=cjs.js:configure-import-meta-url/main.js'); | ||
console.log('privateProp=cjs.js:configure-import-meta-url/main.js'); | ||
console.log('null=cjs.js:configure-import-meta-url/main.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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
console.log('resolved'); | ||
console.log('resolved'); | ||
console.log('resolved'); | ||
|
||
console.log(import.meta.url); | ||
console.log(import.meta.privateProp); | ||
console.log(import.meta); | ||
|
||
console.log('es.js/configure-import-meta-url/main.js'); | ||
console.log('url=es.js:configure-import-meta-url/main.js'); | ||
console.log('privateProp=es.js:configure-import-meta-url/main.js'); | ||
console.log('null=es.js:configure-import-meta-url/main.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 |
---|---|---|
@@ -1,10 +1,16 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
console.log('resolved'); | ||
console.log('resolved'); | ||
console.log('resolved'); | ||
|
||
console.log((document.currentScript && document.currentScript.src || new URL('iife.js', document.baseURI).href)); | ||
console.log(undefined); | ||
console.log(({ url: (document.currentScript && document.currentScript.src || new URL('iife.js', document.baseURI).href) })); | ||
|
||
console.log('iife.js/configure-import-meta-url/main.js'); | ||
console.log('url=iife.js:configure-import-meta-url/main.js'); | ||
console.log('privateProp=iife.js:configure-import-meta-url/main.js'); | ||
console.log('null=iife.js:configure-import-meta-url/main.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
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,3 @@ | ||
console.log(import.meta.url); | ||
console.log(import.meta.privateProp); | ||
console.log(import.meta); |
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,3 @@ | ||
console.log(import.meta.url); | ||
console.log(import.meta.privateProp); | ||
console.log(import.meta); |