|
1 | | -# Symfony Reprise |
| 1 | +<p align="center"><a href="https://symfony.com" target="_blank"> |
| 2 | + <img src="https://symfony.com/logos/symfony_dynamic_01.svg" alt="Symfony Logo"> |
| 3 | +</a></p> |
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 | +<h3 align="center"> |
| 6 | + <img src="doc/symfony-reprise.svg" alt="Symfony Reprise" height="32" align="center"> Symfony Reprise: Webpack Encore's heritage, for modern bundlers |
| 7 | +</h3> |
6 | 8 |
|
7 | | -**EXPERIMENTAL** This bundle is experimental and is likely to change, or even change drastically. |
| 9 | +<p align="center"> |
| 10 | + <a href="https://github.com/symfony/reprise/releases"><img src="https://img.shields.io/github/v/tag/symfony/reprise?sort=semver&label=tag&color=crimson" alt="Latest tag"></a> |
| 11 | + <a href="https://packagist.org/packages/symfony/reprise"><img src="https://img.shields.io/packagist/php-v/symfony/reprise?label=php&color=crimson" alt="PHP version"></a> |
| 12 | + <a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/node/v/@symfony%2Freprise?label=node&color=crimson" alt="Node version"></a> |
| 13 | + <a href="https://github.com/symfony/reprise/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/symfony/reprise/ci.yml?branch=main&label=CI" alt="CI"></a> |
| 14 | + <a href="https://github.com/symfony/reprise/blob/main/LICENSE"><img src="https://img.shields.io/github/license/symfony/reprise?label=license&color=crimson" alt="License"></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 | + <a href="https://github.com/symfony/webpack-encore">Webpack Encore</a> 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](https://github.com/symfony/webpack-encore-bundle)'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