mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-21 12:40:39 +00:00
fix: enable cache busting for js files (#163)
This commit is contained in:
parent
c3bcc40486
commit
851aec0c1f
@ -1,4 +1,4 @@
|
||||
<script src="{{ index (index .Site.Data.assets "bundle.js") "src" | relURL }}"></script>
|
||||
<script src="{{ index (index .Site.Data.assets "main.js") "src" | relURL }}"></script>
|
||||
|
||||
<link
|
||||
rel="preload"
|
||||
|
@ -16,12 +16,12 @@ var config = {
|
||||
path.resolve("src", "sass", "mobile.scss"),
|
||||
path.resolve("src", "sass", "print.scss")
|
||||
],
|
||||
bundle: path.resolve("src", "js", "app.js"),
|
||||
main: path.resolve("src", "js", "app.js"),
|
||||
mermaid: path.resolve("src", "js", "mermaid.js")
|
||||
},
|
||||
output: {
|
||||
filename: "js/[name].bundle.min.js",
|
||||
chunkFilename: "js/[name].chunk.min.js",
|
||||
filename: "js/[name]-[contenthash:8].bundle.min.js",
|
||||
chunkFilename: "js/[name]-[contenthash:8].chunk.min.js",
|
||||
path: path.join(__dirname, "static"),
|
||||
clean: true
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user