diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs
index 5f761f9e9de..95b47e3cd9d 100644
--- a/src/librustdoc/html/render/write_shared.rs
+++ b/src/librustdoc/html/render/write_shared.rs
@@ -305,7 +305,7 @@ pub(super) fn write_shared(
if cx.shared.layout.scrape_examples_extension {
cx.write_minify(
- SharedResource::Unversioned { name: "scrape-examples.js" },
+ SharedResource::InvocationSpecific { basename: "scrape-examples.js" },
static_files::SCRAPE_EXAMPLES_JS,
options.enable_minification,
&options.emit,