Use ESM with import maps to manage modern JavaScript in Laravel without transpiling or bundling.
MIT License
Bot releases are hidden (Show)
Published by tonysm over 2 years ago
importmap:install
command was changed to work with the new Vite setup in Laravel. It should also still work on installs in the Laravel 8 frontends setups using Mix.Published by tonysm over 2 years ago
importmap:pin
command was breaking depending on the package name because we needed to wrap the package name using the preg_quote
to escape it. Otherwise, some characters might become part of the regex itself. https://github.com/tonysm/importmap-laravel/pull/16
Published by tonysm over 2 years ago
es-module-shims
to version 1.5.8 (https://github.com/tonysm/importmap-laravel/commit/21db811ff837bf384f3331d7d47aa692839ad230)Published by tonysm over 2 years ago
importmap:audit
and importmap:outdated
commands (https://github.com/tonysm/importmap-laravel/pull/14)es-module-shims
dependency (https://github.com/tonysm/importmap-laravel/pull/14)Published by tonysm over 2 years ago
/
instead of \
. Anyways, that should be fixed now. Define the directories with /
as you would on any Unix/Linux OS and the package will make sure that gets converted to the correct directory separator when dealing with file paths and to the /
separator when dealing with URIs https://github.com/tonysm/importmap-laravel/pull/5
Published by tonysm over 2 years ago
.importmap-manifest.json
(with a dot prefix) so it can be included in the Vapor artifact (which doesn't remove dotfiles by default).importmap.php
config file, make sure you re-publish that (no need to publish it if you haven't done that)Published by tonysm over 2 years ago
Published by tonysm over 2 years ago
AssetResolver
invokable class which should add a ?digest=$HASH
to the asset URL, which is useful for cache busting while in local development. This won't be used in production as the optimize command already generates the full URLs there, which means the AssetResolver
won't be calledentrypoint
was made optional and it defaults to the app
module, which matches the "entrypoint" file in the default Laravel install (resources/js/app.js
)