Created
November 6, 2017 17:03
-
-
Save blink1073/590367109779d537d781f9d739002836 to your computer and use it in GitHub Desktop.
es6 module with es5 target
This file contains hidden or 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
import * as path from 'path'; | |
function foo() { | |
return import('leaflet').then(function (mod) { | |
console.log(mod); | |
}); | |
} | |
; | |
console.log(path); | |
console.log(foo); |
This file contains hidden or 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
import * as path from 'path'; | |
function foo(): Promise<void> { | |
return import('leaflet').then(mod => { | |
console.log(mod); | |
}); | |
}; | |
console.log(path); | |
console.log(foo); |
This file contains hidden or 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
Show hidden characters
{ | |
"compilerOptions": { | |
"declaration": true, | |
"noImplicitAny": true, | |
"noEmitOnError": true, | |
"noUnusedLocals": true, | |
"module": "esnext", | |
"moduleResolution": "node", | |
"target": "es5", | |
"outDir": "./lib", | |
"lib": ["ES5", "ES2015.Promise", "DOM", "ES2015.Collection"] | |
}, | |
"include": ["src/*"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment