diff --git a/cmd/build/data_source.go b/cmd/build/data_source.go
index 6fbc6452..fa133abb 100644
--- a/cmd/build/data_source.go
+++ b/cmd/build/data_source.go
@@ -191,8 +191,6 @@ func DataSource(buildPath string, siteConfig readers.SiteConfig) {
}
// Get the string value of the static HTML.
renderedHTMLStr := renderedHTML.String()
- // Inject ID needed for hydrating the SPA.
- renderedHTMLStr = strings.Replace(renderedHTMLStr, "", "", 1)
// Convert the string to byte array that can be written to file system.
diff --git a/ejected/main.js b/ejected/main.js
index eafa96aa..a5a6ff7d 100755
--- a/ejected/main.js
+++ b/ejected/main.js
@@ -1,6 +1,6 @@
import Router from './router.svelte';
-let target = document.querySelector('#hydrate-plenti').parentNode;
+let target = document.querySelector('html').parentNode;
new Router({
target: target,
diff --git a/generated/ejected.go b/generated/ejected.go
index fa0b0dfc..b757b7f8 100644
--- a/generated/ejected.go
+++ b/generated/ejected.go
@@ -110,7 +110,7 @@ staticBuildStr.forEach(arg => {
});`),
"/main.js": []byte(`import Router from './router.svelte';
-let target = document.querySelector('#hydrate-plenti').parentNode;
+let target = document.querySelector('html').parentNode;
new Router({
target: target,