Addy Osmani

Addy Osmani

@addyosmani · Twitter ·

JavaScript import-maps are now supported cross-browser! 🗺️ https://web.dev/import-maps-in-all-modern-browsers/ <script type="importmap"> can define a mapping of external module names to their corresponding URLs, making it easier to use in your code.




<script type="importmap">
  {
    "imports": {
      "lodash": "https://unpkg.com/lodash@4.17.21/lodash.js"
    }
  }
</script>

<script type="module">
    import _ from 'lodash';
    console.log(_.map([1, 2, 3], (n) => n * 2));
</script>