Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can use ES6 imports for JS and CSS directly in the browser, by including es-module-shims[1]. No need for a package manager, transpiler, or build step.

<script type="module">

import Pkg from 'https://site.com/pkg.js'

import sheet from 'https://site.com/sheet.css' assert { type: 'css' };

</script>

1: https://github.com/guybedford/es-module-shims



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: