Created
November 21, 2015 16:26
-
-
Save getflourish/ef42becc501a8df8810f to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<script src="../node_modules/babel/dist/browser.js"></script> | |
<script src="../dist/es6-module-loader-dev.js"></script> | |
<script> | |
System.transpiler = 'babel'; | |
System.import('test.js').then(function(module) { | |
new module.Foo(); | |
}); | |
</script> | |
</body> | |
</html> |
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
export var hello = 'world'; |
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 lib from 'test1.js'; | |
export class Foo { | |
constructor() { | |
console.log('Created the ES6 class foo!'); | |
console.log(lib.hello); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment