1.1.0 • Published 4 years ago

twig-concat-loader v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

twig-concat-loader

npm version Build Status Dependencies License


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',
        ],
      },
    ],
  },
};