Webpack Encore - Pro JavaScript and CSS for Everyone
summary
Webpack Encore simplifies Webpack by generating a usable config (few lines) and running Babel, Sass, CSS extraction, image/font asset copying and hashed filenames automatically. It uses yarn/npm for installs, supports multiple entries and shared chunks to avoid duplicate jQuery, enables React/JSX with enableReactPreset, and offers code-splitting. Production builds add content hashes; the resulting mapping lives in manifest.json which Symfony’s asset system can read to serve the correct versioned files.
AI-written summary · about
chapters (19)
- 0:00Introduction and speaker background
- 2:30Modern JavaScript and its challenges
- 8:47Babel and JavaScript transpilation
- 12:15JavaScript modules and Webpack basics
- 19:59Introducing Webpack Encore
- 23:05Setting up Webpack Encore
- 25:08Handling CSS and dependencies
- 27:14Managing images and fonts
- 29:20Using Sass or Less with Encore
- 30:23Page-specific CSS and multiple entries
- 31:49Shared entries and performance
- 33:12Automatic versioning and caching
- 35:40React integration and JSX
- 38:49Enabling PostCSS and other loaders
- 40:14Code splitting and advanced features
- 41:39Why Webpack Encore simplifies development
- 43:12Production deployments and best practices
- 44:56Using Encore outside Symfony
- 46:02Deployment best practices and Q&A
