<!DOCTYPE html>
<html>

  <head>
    <script src="https://google.github.io/traceur-compiler/bin/traceur.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.31/system.js"></script>
  </head>

  <body>
    <h1>Testing ES6 module loader</h1>
    <p class="test">Let's see if it is working?</p>
    <script>
      System.import('script.js');
    </script>
  </body>

</html>
import {testModule} from 'module.js';

testModule();
# Using modern ES6 module loader in web sites

In order to use module loader, you must load these libraries in the head of your page:
- [Traceur](https://github.com/systemjs/plugin-traceur)
- [SystemJS](https://github.com/systemjs/systemjs)

Then at the bottom of your page call your entry script

```html
  <script>
    System.import('script.js');
  </script>
```
export let testModule = () => {
  let test = document.querySelector('.test');
  test.innerHTML = 'It works!';
  test.style.cssText = 'color: red';
}