3 ms·
script supports a new type, module. <script type="module"> // loads the 'q' export from 'mymodule.js' in the same path as the page import {
by ripter 12y ago
script supports a new type, module.
<script type="module">
// loads the 'q' export from 'mymodule.js' in the same path as the page
import { q } from 'mymodule';
new q(); // -> 'this is an es6 class!'
</script>
You can use it today with things like : https://github.com/ModuleLoader/es6-module-loader https://github.com/ModuleLoader/es6-module-loader