Skip to content

Instantly share code, notes, and snippets.

@getflourish
Created November 21, 2015 16:26
Show Gist options
  • Save getflourish/ef42becc501a8df8810f to your computer and use it in GitHub Desktop.
Save getflourish/ef42becc501a8df8810f to your computer and use it in GitHub Desktop.
<!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>
export var hello = 'world';
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