Skip to content
Branch: master
Go to file

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time



This is a Twig compiler for the Mimosa build tool. It will pre-compile your twig templates for use in the browser.

Some useful links for more information on this module:


Add 'twig' to your list of modules. That's all! Mimosa will install the module for you when you start mimosa watch or mimosa build.


This module will compile Twig files during mimosa watch and mimosa build. This module utilizes all of the built-in template behavior that comes with Mimosa's basic template compiler. See the mimosa website for more information about how templates are treated or check out the various template configuration options.

Default Config

twig: {
  lib: undefined
  extensions: [ "twig", "twg" ]
  options: {
    debug: false,
    trace: false

lib require'd compiler library

You may want to use this module but may not be ready to use the latest version of Twig. Using the lib property you can provide a specific version of Twig if the one being used by this module isn't to your liking. To provide a specific version, you must have it npm installed into your project and then provide it to lib. For instance: lib: require('twig').

extensions an array of strings

The extensions of your Twig files.

options object

Pass-through compiler options to the compiler library

debug, trace, booleans

Debug flags for twig compiler


Mimosa template compiler module for the Twig templating language


You can’t perform that action at this time.