Replace the placeholders for all index files

This commit is contained in:
Bjarne Oeverli 2021-06-16 20:01:22 +02:00
parent 29e2a85d9a
commit 0cd9619416
No known key found for this signature in database
GPG Key ID: 38A98464B30B17FB

View File

@ -20,7 +20,7 @@ if (process.env.NODE_ENV !== 'development') {
// Filthy hack, but it works for now. Soon to implement config from the server.
replace.sync({
files: staticPath + '/index.html',
files: staticPath + '/**/*.html',
from: [/{{NODE_ENV}}/g, /{{__SECRET_CONFIG}}/g],
to: [process.env.NODE_ENV, JSON.stringify(config.get('__client_config'))],
});