2019-02-24 18:05:06 +01:00
|
|
|
webpack_encore:
|
2020-01-07 19:16:39 +01:00
|
|
|
# The path where Encore is building the assets - i.e. Encore.setOutputPath()
|
2019-02-24 18:05:06 +01:00
|
|
|
output_path: '%kernel.project_dir%/public/build'
|
2020-01-07 19:16:39 +01:00
|
|
|
# If multiple builds are defined (as shown below), you can disable the default build:
|
|
|
|
# output_path: false
|
|
|
|
|
2021-10-02 21:23:34 +02:00
|
|
|
# Set attributes that will be rendered on all script and link tags
|
|
|
|
script_attributes:
|
|
|
|
defer: true
|
|
|
|
# Uncomment (also under link_attributes) if using Turbo Drive
|
|
|
|
# https://turbo.hotwired.dev/handbook/drive#reloading-when-assets-change
|
2022-03-04 20:19:43 +01:00
|
|
|
'data-turbo-track': reload
|
|
|
|
link_attributes:
|
2021-10-02 21:23:34 +02:00
|
|
|
# Uncomment if using Turbo Drive
|
2022-03-04 20:19:43 +01:00
|
|
|
'data-turbo-track': reload
|
2021-10-02 21:23:34 +02:00
|
|
|
|
|
|
|
# If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')
|
2020-01-07 19:16:39 +01:00
|
|
|
# crossorigin: 'anonymous'
|
|
|
|
|
2021-10-02 21:23:34 +02:00
|
|
|
# Preload all rendered script and link tags automatically via the HTTP/2 Link header
|
|
|
|
preload: true
|
2020-01-07 19:16:39 +01:00
|
|
|
|
|
|
|
# Throw an exception if the entrypoints.json file is missing or an entry is missing from the data
|
2022-03-04 19:32:04 +01:00
|
|
|
strict_mode: true
|
2020-01-07 19:16:39 +01:00
|
|
|
|
2021-10-02 21:23:34 +02:00
|
|
|
# If you have multiple builds:
|
2020-01-07 19:16:39 +01:00
|
|
|
# builds:
|
|
|
|
# pass "frontend" as the 3rg arg to the Twig functions
|
|
|
|
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}
|
|
|
|
|
|
|
|
# frontend: '%kernel.project_dir%/public/frontend/build'
|
|
|
|
|
|
|
|
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
|
|
|
# Put in config/packages/prod/webpack_encore.yaml
|
2022-03-04 19:32:04 +01:00
|
|
|
cache: false
|
|
|
|
|
|
|
|
when@prod:
|
|
|
|
webpack_encore:
|
|
|
|
cache: true
|
|
|
|
|
|
|
|
when@test:
|
|
|
|
webpack_encore:
|
|
|
|
strict_mode: true
|