fix: enable cache busting for js files (#163)

This commit is contained in:
Robert Kaussow 2022-01-23 21:42:59 +01:00 committed by GitHub
parent c3bcc40486
commit 851aec0c1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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"

View File

@ -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
}, },