Webpack – 将哈希包的URL插入静态哈巴狗模板

即时通讯使用webpack pug-html-loader +文件加载器来生成一堆静态帕格模板。

我也想开始添加哈希包的文件名,但我不能解决如何将哈希文件名插入我所有的哈巴狗模板

这是如何引用我的包当前在所有的哈巴狗模板:

script(src="bundle.js") link(href="bundle.css") 

我怎么修改引用bundle-[chunkhash].js / bundle-[chunkhash].css] – 我需要传递一些variables到我的webpack.config.js中的pug-html-loader吗?

注意使用extract-text-plugin将我的SASS输出到.css包文件