搜索

首页  >  问答  >  正文

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

ringa_leeringa_lee2872 天前678

全部回复(1)我来回复

  • 天蓬老师

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

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

    如果没有置顶 loader,那么默认使用 ejs 作为模板引擎。

    所以可以显示指定 html-loader

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

    回复
    0
  • 取消回复