Twig function gotenberg_asset does not work well with versioned assets #146
Replies: 2 comments 1 reply
-
Hi @thafirstone ! Do you need to send these assets in the payload? You can just use WebpackEncore as usual, Gotenberg will retrieve your assets by their URL (and maybe use HTTP caching). If you still want to send your assets in the payload, you can try something like (not tested): gotenberg_asset(encore_entry_js_files('app.js')) |
Beta Was this translation helpful? Give feedback.
-
IMO, using the Is it possible for you to configure |
Beta Was this translation helpful? Give feedback.
-
Hi there,
I use
Webpack Encore
and so my templates contain versioned assets. When I use thegotenberg_asset
twig function provided in the bundle, the paths are not well defined.So I decided to create my own twig function as follows:
It works very well. The only problem is that the
GotenbergAssetRuntime
class is marked@Internal
, which means that it should not be called outside the bundle.Is there another way to do this?
Beta Was this translation helpful? Give feedback.
All reactions