Skip to content

Instantly share code, notes, and snippets.

@carlfranz
Last active December 14, 2018 20:19
Show Gist options
  • Select an option

  • Save carlfranz/62ead561a16399b6d126befa17c5f664 to your computer and use it in GitHub Desktop.

Select an option

Save carlfranz/62ead561a16399b6d126befa17c5f664 to your computer and use it in GitHub Desktop.
ES6 modules simple example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div id="app">
...
</div>
<script type="module">
import {user} from "./user.js";
console.log(user);
...
</script>
</body>
</html>
export const user = {
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment