pmg/twig-webpack

This package is abandoned and no longer maintained. No replacement package was suggested.

A Twig extension to make working with webpack a bit easier

1.1.0 2017-02-13 15:02 UTC

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.