您的位置:首页技术文章
文章详情页

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

浏览:62日期:2023-09-27 14:04:24

问题描述

问题解答

回答1:

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’ }) ]}

标签: JavaScript