W
W
Wasya UK2018-02-17 18:11:46
HTML
Wasya UK, 2018-02-17 18:11:46

How to work with multiple templates in webpack?

How to render multiple pug files to html?

new HtmlWebpackPlugin({
      inject: 'body',
      filename: "[name].html",
      template: "!!html-webpack-plugin/lib/loader.js!./app/[name].pug",
      entries: {
          index: 'index',
          error: 'error'
      }
    }),

Thanks in advance

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question