diff --git a/lib/utils/generate_asset_cache.js b/lib/utils/generate_asset_cache.js index 607a11c..35c792a 100644 --- a/lib/utils/generate_asset_cache.js +++ b/lib/utils/generate_asset_cache.js @@ -59,10 +59,10 @@ function generate_service_worker(chunk_files) { }]`; return read('templates/service-worker.js') - .replace('__timestamp__', Date.now()) - .replace('__assets__', JSON.stringify(assets)) - .replace('__shell__', JSON.stringify(chunk_files.concat('/index.html'))) - .replace('__routes__', route_code); + .replace(/__timestamp__/g, Date.now()) + .replace(/__assets__/g, JSON.stringify(assets)) + .replace(/__shell__/g, JSON.stringify(chunk_files.concat('/index.html'))) + .replace(/__routes__/g, route_code); } function generate_index(main_file) {