search

Home  >  Q&A  >  body text

javascript - html-webpack-plugin与jinja2有冲突,如何能让html-webpack-plugin插件不去解析%

ringa_leeringa_lee2782 days ago654

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-04-17 16:37:38

    By default (if you don't specify any loader in any way) a fallback ejs loader kicks in.

    If there is no pinned loader, ejs will be used as the template engine by default.

    So you can display the specified html-loader

    {
      module: {
        loaders: [
          {
            test: /\.html$/,
            loader: 'html-loader'
          },
      },
      plugins: [
        new HtmlWebpackPlugin({
          template: 'src/index.html'
        })
      ]
    }

    reply
    0
  • Cancelreply