{"repo":"tonysm/importmap-laravel","free":true,"listed":false,"github":"https://github.com/tonysm/importmap-laravel","clone":"git clone https://github.com/tonysm/importmap-laravel.git","description":"Use ESM with import maps to manage modern JavaScript in Laravel without transpiling or bundling.","language":"PHP","stars":152,"topics":["hacktoberfest","importmap","laravel"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Introduction Use ESM with importmap to manage modern JavaScript in Laravel without transpiling or bundling. Inspiration This package was inspired by the Importmap Rails gem. Some pieces of this README were copied straight from there and adapted to the Laravel version. How does it work? Import maps lets you import JavaScript modules directly from the browser using logical names that map to versioned/digested files. So you can build modern JavaScript applications using JavaScript libraries made for ES modules (ESM) without the need for transpiling or bundling. This frees you from needing Webpack, Yarn, npm, or any other part of the JavaScript toolchain. With this approach, you'll ship many small JavaScript files instead of one big JavaScript file. Thanks to HTTP/2 that no longer carries a material performance penalty during the initial transport, and offers substantial benefits over the long run due to better caching dynamics. Whereas before any change to any JavaScript file included in your big bundle would invalidate the cache for the whole bundle, now only the cache for that single file is invalidated. Import maps are supported natively in all major, modern browsers. If you need to work with legacy browsers without native support, you may want to explore using the shim available. Installation You can install the package via Composer: The package has an install command that you may run to replace the default Laravel scaffold with one to use importmap: Next, we need to add the","default_branch":null,"files":null,"tree":[],"storefront":"/r/tonysm","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tonysm/importmap-laravel/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}