Many libs support ES module imports. Whether or not it works depends on the package and if it has it's own dependencies (I think). I've never done this but seen it out in the wild
Eg
<script type="module">
import axios from 'https://cdn.skypack.dev/axios';
axios.get('https://api.example.com').then(response => console.log(response.data));
</script>