113.使用for循环输出HtmlWebpackPlugin中的内容,修改模板文件index.html

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>webpack demo</title>
	<link rel="stylesheet" href="">
</head>
<body>
	<% for (var key in htmlWebpackPlugin) {%>
		<%= key %>
	<% } %>
</body>
</html>

114.使用cnpm run webpack命令重新打包

Webpack入门教程二十三

115.查看index-0707837fd67a7b4a8e3e.html文件输出的内容

Webpack入门教程二十三


本文转自 素颜猪 51CTO博客,原文链接:http://blog.51cto.com/suyanzhu/1899518


相关文章:

  • 2021-12-25
  • 2021-11-03
  • 2021-05-06
  • 2021-05-07
  • 2021-12-01
  • 2021-04-26
  • 2021-05-03
  • 2022-12-23
猜你喜欢
  • 2021-12-13
  • 2021-06-21
  • 2021-09-15
  • 2021-08-25
  • 2021-05-29
  • 2021-08-09
  • 2021-04-22
相关资源
相似解决方案