symfony / reprise
Integrate Vite and Rsbuild with Symfony, a reprise of Webpack Encore Bundle.
Package info
Language:TypeScript
Type:symfony-bundle
pkg:composer/symfony/reprise
Requires
- php: >=8.4
- symfony/asset: ^7.4|^8.0
- twig/twig: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^13.2
- symfony/cache: ^7.4|^8.0
- symfony/framework-bundle: ^7.4|^8.0
- symfony/var-exporter: ^7.4|^8.0
- symfony/web-link: ^7.4|^8.0
README
Symfony Reprise: Webpack Encore's heritage, for modern bundlers
Webpack Encore gave Symfony first-class asset integration for Webpack.
Symfony Reprise brings the same to Vite and Rsbuild.
Warning
Experimental this bundle is experimental and is likely to change, or even change drastically.
Symfony Reprise covers only the Symfony-side glue the bundlers leave out:
- π― Multiple entries: build several independent entry points from one config
- π
entrypoints.json: generated in both build and dev-server modes - πΊοΈ
manifest.json: maps each logical filename to its hashed URL - π Asset versioning: content-hash cache busting, wired into the manifest
- π File copy: copy static files (images, fontsβ¦) into the build, keyed in the manifest
- π₯ Dev server & HMR: points Twig at the running Vite/Rsbuild server
- π·οΈ Twig tag rendering:
reprise_entry_script_tags/reprise_entry_link_tagsrender straight fromentrypoints.json - π§© Symfony UX / Stimulus: registers
controllers.jsonand local controllers, eager or lazy - π CDN support: serve built assets from an absolute
publicPath - π‘οΈ Subresource Integrity: SRI hashes in
entrypoints.json
Vite and Rsbuild already handle Sass/Less/PostCSS, TypeScript, JSX/Vue/Svelte, code splitting, content hashing, source maps, minification and HMR on their own, so Symfony Reprise does not reimplement any of that.
It generates the Encore-compatible entrypoints.json and manifest.json that Reprise's own Symfony bundle (RepriseBundle) reads to render the <script> and <link> tags, wires up the native dev server, and turns your Stimulus controllers into a running application.