One recipe, one command
Start with two packages.
AssetMapper serves your JavaScript straight from assets/, with no build step and no node_modules, and StimulusBundle wires every UX package that follows. The recipe writes the rest.
Already building with Vite or Rsbuild? Symfony Reprise gives them the Symfony integration Webpack Encore had, and UX packages work the same way.
Without a build step
$ composer require symfony/asset-mapper symfony/stimulus-bundle
With Vite or Rsbuild
$ composer require symfony/reprise
$ npm install @symfony/reprise --save-dev
-
assets
-
bootstrap.jsStarts Stimulus & registers all files in
controllers/as Stimulus controllers. -
app.jsYour main JavaScript file. It's job is to import and load all other files.
-
controllers.jsonConfigures 3rd-party Stimulus controllers. This file is automatically updated when you install a UX package.
-
controllersThe home of your custom Stimulus controllers!
-
hello_controller.jsAn example controller. Add it to any element with
data-controller="hello"
-
-
styles
-
app.cssYour main CSS file
-
-
-
package.jsonHolds your Node dependencies, when you build your assets with a bundler.
-
vite.config.tsVite configuration, with the Symfony Reprise plugin wired in.
-
rsbuild.config.tsRsbuild configuration, with the Symfony Reprise plugin wired in.