as shown in the title, if webpack is configured in this way
var htmlWebpackPlugin = require("html-webpack-plugin");
const CleanWebpackPlugin = require("clean-webpack-plugin");
let pathsToClean = [
"dist",
];
module.exports = {
entry: "./src/app.js",
output: {
path: __dirname + "/dist",
filename: "main.[chunkhash].js",
},
plugins: [
new htmlWebpackPlugin({
template: "./src/footer.html",
hash: true,
filename: "footer.html",
minify: {
collapseWhitespace: false
}
}),
new CleanWebpackPlugin(pathsToClean),
],
module: {
rules: [
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
}
]
}
};
so the final html import file is as follows:
<script type="text/javascript" src="main.95f86be9ceffb45cc1a3.js?ae7b82ac308049d74cc6"></script>
I hope that the last automatically generated html file will be in the format of / static/js/js file. What should I do?