|
1 | | -# Symfony Reprise |
| 1 | +<h1 align="center"> |
| 2 | + <img src="doc/symfony-reprise.svg" alt="Symfony Reprise" height="32" align="top"> Symfony Reprise |
| 3 | +</h1> |
2 | 4 |
|
3 | | -[](https://www.npmjs.com/package/@symfony/reprise) |
4 | | -[](https://www.npmjs.com/package/@symfony/reprise) |
5 | | -[](https://www.npmjs.com/package/@symfony/reprise) |
| 5 | +<p align="center"> |
| 6 | + <a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/npm/v/@symfony%2Freprise?color=crimson&label=" alt="npm version"></a> |
| 7 | + <a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/npm/dm/@symfony%2Freprise?color=crimson&label=" alt="npm downloads"></a> |
| 8 | + <a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/npm/l/@symfony%2Freprise?color=crimson&label=" alt="license"></a> |
| 9 | +</p> |
6 | 10 |
|
7 | | -**EXPERIMENTAL** This bundle is experimental and is likely to change, or even change drastically. |
| 11 | +<p align="center"> |
| 12 | + <a href="https://packagist.org/packages/symfony/reprise"><img src="https://img.shields.io/packagist/v/symfony/reprise?color=crimson&label=" alt="Packagist version"></a> |
| 13 | + <a href="https://packagist.org/packages/symfony/reprise"><img src="https://img.shields.io/packagist/dm/symfony/reprise?color=crimson&label=" alt="Packagist downloads"></a> |
| 14 | + <a href="https://packagist.org/packages/symfony/reprise"><img src="https://img.shields.io/packagist/php-v/symfony/reprise?color=crimson&label=php" alt="PHP version"></a> |
| 15 | +</p> |
8 | 16 |
|
9 | | -Webpack Encore gave Symfony first-class asset integration for Webpack. Symfony Reprise gives you the same integration for **Vite** and **Rsbuild**. |
| 17 | +<p align="center"> |
| 18 | + Webpack Encore gave Symfony first-class asset integration for Webpack.<br> |
| 19 | + Symfony Reprise brings the same to <strong>Vite</strong> and <strong>Rsbuild</strong>. |
| 20 | +</p> |
| 21 | + |
| 22 | +> [!WARNING] |
| 23 | +> **Experimental** this bundle is experimental and is likely to change, or even change drastically. |
| 24 | +
|
| 25 | +Symfony Reprise covers only the Symfony-side glue the bundlers leave out: |
| 26 | + |
| 27 | +- 🎯 **Multiple entries**: build several independent entry points from one config |
| 28 | +- 📄 **`entrypoints.json`**: generated in both build and dev-server modes |
| 29 | +- 🗺️ **`manifest.json`**: maps each logical filename to its hashed URL |
| 30 | +- 🔖 **Asset versioning**: content-hash cache busting, wired into the manifest |
| 31 | +- 🔥 **Dev server & HMR**: points Twig at the running Vite/Rsbuild server |
| 32 | +- 🧩 **Symfony UX / Stimulus**: registers `controllers.json` and local controllers, eager or lazy |
| 33 | +- 🌐 **CDN support**: absolute `publicPath` *(planned)* |
| 34 | +- 🛡️ **Subresource Integrity**: SRI hashes in `entrypoints.json` *(planned)* |
| 35 | +- 📦 **Shared runtime chunk**: one runtime shared across entries *(planned)* |
| 36 | + |
| 37 | +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. |
| 38 | + |
| 39 | +It generates the Encore-compatible `entrypoints.json` and `manifest.json` that WebpackEncoreBundle's Twig helpers (`encore_entry_script_tags()`, `encore_entry_link_tags()`) read, wires up the native dev server, and turns your Stimulus controllers into a running application. |
10 | 40 |
|
11 | 41 | [Read the documentation](doc/index.rst) |
0 commit comments