twig-concat-loader
v1.1.0
Published
Webpack loader to merge twig templates that use include function
Downloads
3
Maintainers
Readme
twig-concat-loader
This plugin is under development!
This loader addresses a specific use case when you're using HtmlWebpackPlugin with html-loader to output twig templates. This templates can be compiled on a server with additional data and webpack is used to preprocess them (to inline assets, generate checksums etc.).
This loader will find include
usage in your processed twig files and will merge all templates into one.
Installation
npm install twig-concat-loader --save-dev
Usage
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.(twig|html)$/i,
use: [
'html-loader',
'twig-concat-loader',
],
},
],
},
};