daddl3/vite-and-compress-twig-symfony-bundle
webpack.config.js to vite.config.js.npm run dev/build).{{ asset() }} or {% block stylesheets %}./assets directory).vite.config.js with entry points (e.g., app.js, app.css) matching current Webpack Encore config.@vitejs/plugin-symfony if available, or alternatives like vite-plugin-symfony-reloader).composer require daddl3/vite-and-compress-twig-symfony-bundle.config/packages/daddl3_vite_and_compress_twig.yaml:
daddl3_vite_and_compress_twig:
entry_points:
app: /assets/src/app.js
output_dir: '%kernel.project_dir%/public/build'
manifest_file: '%kernel.project_dir%/public/build/manifest.json'
config/packages/twig.yaml to enable compression:
twig:
asset_compression: true
{{ encore_entry_link_tags() }} with {{ vite_entry_link_tags('app') }}.{{ encore_entry_script_tags() }} with {{ vite_entry_script_tags('app') }}.{% block stylesheets %}) to use Vite’s manifest.npm run dev/build with Vite commands (e.g., npm run dev for HMR, npm run build for production).assets:install command to copy Vite’s output (public/build) to the web directory.vite.config.js.vite.config.js changes may need maintenance as Vite evolvesHow can I help you explore Laravel packages today?