1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-12 01:50:52 +01:00

Fixed Webpack config to allow multiple asset replacements (#1739)

* Allow multiple template replacements

* double quotes!
This commit is contained in:
Benjamin Staneck 2020-06-02 14:30:57 +02:00 committed by GitHub
parent 11ddca100b
commit 4b63727006
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -304,7 +304,7 @@ export default (_env: never, args: Configuration): Configuration[] => {
const manifest = require("./material/assets/manifest.json")
const template = toPairs<string>(manifest)
.reduce((content, [from, to]) => {
return content.replace(from, to)
return content.replace(new RegExp(from, "g"), to)
}, fs.readFileSync("material/base.html", "utf8"))
/* Save template with replaced assets */