Ever wanted to just... write modern JavaScript and have it work without needing to fuss with a build system?
Me too! And finally - thanks to advances in the web, web servers & new component from Symfony, it's possible! Hello AssetMapper! In this tutorial, we'll:
- The basics of modern JavaScript in a browser, why & how things finally "just work" & shim
- Installing the new AssetMapper component
- Understanding asset "logical paths" & versioning
- Working with the new importmap.php file & importmap:require
- Using CSS, along with pre-processors like Sass or Tailwind
- Adding StimulusBundle & 3rd party UX controllers
- Lazy Stimulus controllers!
- Finding package files and (optionally) downloading them
- Page-specific CSS & JS
- Deploying!
- Measuring & tweaking performance + preloading
With AssetMapper, it's back to the beautiful basics of coding, refreshing and getting back to work.