Creating Page-Specific CSS/JSEdit this page
Warning: You are browsing the documentation for Symfony 4.3, which is no longer maintained.
Read the updated version of this page for Symfony 6.2 (the current stable version).
If you're creating a single page app (SPA), then you probably only need to define
one entry in
webpack.config.js. But if you have multiple pages, you might
To learn how to set this up, see the Encore: Setting up your Project example.
checkout page as its own "app", where
checkout.js includes all the functionality
every page. For that reason, it usually makes sense to have one entry (e.g.
page (i.e. it's included in the layout of your app). This means that you will
always have one, global entry on every page (e.g.
app) and you may have one
Be sure to use split chunks to avoid duplicating and shared code between your entry files.