mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-21 20:50:40 +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
|
<link
|
||||||
rel="preload"
|
rel="preload"
|
||||||
|
@ -16,12 +16,12 @@ var config = {
|
|||||||
path.resolve("src", "sass", "mobile.scss"),
|
path.resolve("src", "sass", "mobile.scss"),
|
||||||
path.resolve("src", "sass", "print.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")
|
mermaid: path.resolve("src", "js", "mermaid.js")
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: "js/[name].bundle.min.js",
|
filename: "js/[name]-[contenthash:8].bundle.min.js",
|
||||||
chunkFilename: "js/[name].chunk.min.js",
|
chunkFilename: "js/[name]-[contenthash:8].chunk.min.js",
|
||||||
path: path.join(__dirname, "static"),
|
path: path.join(__dirname, "static"),
|
||||||
clean: true
|
clean: true
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user