1.0.2 • Published 2 years ago

laravel-mix-njk v1.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

laravel-mix-njk

Laravel Mix extension to compile Nunjucks templates.

Install

npm install laravel-mix-njk --save-dev

Usage

const mix = require('laravel-mix');
require('laravel-mix-njk');

mix.njk('resources/views/', {
  searchPath: '/',
  context: {
    foo: 'bar'
  }
});
  • searchPath - Search path for templates/partials
  • context - Nunjucks data passed to the template

For more info about Nunjucks API, check https://mozilla.github.io/nunjucks/api.html