mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed Webpack config to allow multiple asset replacements (#1739)
* Allow multiple template replacements * double quotes!
This commit is contained in:
parent
11ddca100b
commit
4b63727006
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user