Download the PHP package dansol/webpack-encore-view-helper without Composer
On this page you can find all versions of the php package dansol/webpack-encore-view-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dansol/webpack-encore-view-helper
More information about dansol/webpack-encore-view-helper
Files in dansol/webpack-encore-view-helper
Package webpack-encore-view-helper
Short Description Symfony webpack encore laminas view helper
License MIT
Informations about the package webpack-encore-view-helper
webpack-encore-view-helper
webpack-encore-view-helper is a laminas-view helper that help render all of the dynamic script and link tags needed when using Symfony Webpack Encore( a simpler way to integrate Webpack into your application - https://symfony.com/doc/current/frontend.html#webpack-encore).
Installation
Run the following to install:
Documentation
Copy webpack_encore_view_helper_config.global.php.dist to config/autoload and rename webpack_encore_view_helper_config.global.php
Adjust configuration based on your enviroment.
example:
Load ConfigProvider in your configuration loader.
Mezzio example:
Basic usage
Special parameters
these parameters can be used in parent template(layout template) - if used in child template an error will be raise:
- auto - load all assets automatically( parent and first child template in content)
- auto-route - load all assets for parent template(layout)
- auto-child - load all assets for child template(firt template in layout content) this parameters avoid the need to load asset in every template that consume an entry point and load asset only in the main layout template
auto* parameters load entry with this logic: asset is loaded matching templatename/entrypoint name configured in webpack_encore_view_helper_config.global.php configuration file in template_entrypoint_map key ( see webpack_encore_view_helper_config.global.php.dist) if not matched the helper will try to match template name equal to entrypoint name. If entrypoint is not resolved an error will be raise.
basic example: