pug-loader

Insert hashed bundle URLs into static pug templates

早过忘川 提交于 2019-12-22 04:56:20
问题 I'm using Webpack pug-html-loader + file-loader to generate a bunch of static pug templates. I also want to start added hashed bundle filenames, but I cant work out how to insert the hashed filenames into all my pug templates This is how I'm referencing my bundle currently in all the pug templates: script(src="bundle.js") link(href="bundle.css") How would I modify that to reference bundle-[chunkhash].js / bundle-[chunkhash].css] - do I need to pass some variables to the pug-html-loader in

Insert hashed bundle URLs into static pug templates

走远了吗. 提交于 2019-12-05 05:42:58
I'm using Webpack pug-html-loader + file-loader to generate a bunch of static pug templates. I also want to start added hashed bundle filenames, but I cant work out how to insert the hashed filenames into all my pug templates This is how I'm referencing my bundle currently in all the pug templates: script(src="bundle.js") link(href="bundle.css") How would I modify that to reference bundle-[chunkhash].js / bundle-[chunkhash].css] - do I need to pass some variables to the pug-html-loader in webpack.config.js? Note: I'm using the extract-text-plugin to output my SASS to a .css bundle file 来源: