Skip to content

Multiple templates dynamically? #10

@lexcode

Description

@lexcode

For multiple templates, how to achieve it without specifying manually the files in webpack.config.js?

import NunjucksWebpackPlugin from "nunjucks-webpack-plugin";

export default {
  plugins: [
    new NunjucksWebpackPlugin({
      templates: [
        {
          from: "/path/to/[name].njk",
          to: "[name].html"
        }
      ]
    })
  ]
};

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions