我有一个这样的模板html文件
b[3]
我想使用<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>aquaWeb</title>
<link rel="stylesheet" type="text/css" href="???">
</head>
<body>
<div id="app">
<div class="some-placeholder">
I want to stylize this placeholder
</div>
</div>
</body>
</html>
中定义的规则来对占位符进行样式化。如何将那个CSS文件附加到此模板中?
答案 0 :(得分:0)
您可以使用html-webpack-include-assets-plugin
来将外部资产添加到html。
var HtmlWebpackIncludeAssetsPlugin = require('html-webpack-include-assets-plugin');
/// ...
plugins: [
new HtmlWebpackPlugin(),
new HtmlWebpackIncludeAssetsPlugin({
assets: [
'path/to/your/css/placeholder.css'
],
append: true })
]