pmg / twig-webpack
A Twig extension to make working with webpack a bit easier
Installs: 9 873
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 8
Forks: 0
Open Issues: 3
Requires
- php: ~5.6|~7.0
- twig/twig: ~1.27|~2.0
Requires (Dev)
- phpunit/phpunit: ~5.7
- symfony/asset: ~2.8|~3.0
- symfony/framework-bundle: ~2.8|~3.0
- symfony/phpunit-bridge: ~2.8|~3.0
- symfony/twig-bridge: ~2.8|~3.0
This package is auto-updated.
Last update: 2020-02-03 15:20:09 UTC
README
This is a small set of libraries and a Symfony bundle for easily integrating the webpack dev server into your Twig templates.
Usage in Twig
{% webpack %} <script src="{{ asset('assets/js/bundled.js') }}"></script> {% endwebpack %}
If webpack is in dev mode (see below), the asset(...)
call is overridden to
point to the webpack dev server. Additionally the webpack
dev server JS
is added above your scripts to provide auto/hot reloading.