')
+ expect(html).not.toContain('production-build-probe')
+ })
+
+ it.each(pages)('hydrates %s without a mismatch', async (path) => {
+ const page = await createPage()
+ const messages: string[] = []
+ page.on('console', message => messages.push(`${message.type()}: ${message.text()}`))
+ page.on('pageerror', error => messages.push(`pageerror: ${error.message}`))
+ await page.goto(url(path), { waitUntil: 'hydration' })
+
+ expect(messages.filter(message => /hydrat|mismatch/i.test(message))).toEqual([])
+ await page.close()
+ })
+})
diff --git a/test/fixtures/map-hydration/app.vue b/test/fixtures/map-hydration/app.vue
new file mode 100644
index 000000000..8f62b8bf9
--- /dev/null
+++ b/test/fixtures/map-hydration/app.vue
@@ -0,0 +1,3 @@
+
+
+
diff --git a/test/fixtures/map-hydration/nuxt.config.ts b/test/fixtures/map-hydration/nuxt.config.ts
new file mode 100644
index 000000000..4d05f97ec
--- /dev/null
+++ b/test/fixtures/map-hydration/nuxt.config.ts
@@ -0,0 +1,17 @@
+import { defineNuxtConfig } from 'nuxt/config'
+
+export default defineNuxtConfig({
+ modules: [
+ '@nuxt/scripts',
+ ],
+ scripts: {
+ registry: {
+ // No page loads a map SDK. Hydration compares the server HTML with the
+ // client's first render, which happens before any script loads.
+ maplibre: { trigger: false },
+ leaflet: { trigger: false, bundle: false },
+ googleMaps: { trigger: false },
+ },
+ },
+ compatibilityDate: '2024-07-05',
+})
diff --git a/test/fixtures/map-hydration/package.json b/test/fixtures/map-hydration/package.json
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/test/fixtures/map-hydration/package.json
@@ -0,0 +1 @@
+{}
diff --git a/test/fixtures/map-hydration/pages/google-maps.vue b/test/fixtures/map-hydration/pages/google-maps.vue
new file mode 100644
index 000000000..e7b51a2c4
--- /dev/null
+++ b/test/fixtures/map-hydration/pages/google-maps.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/map-hydration/pages/leaflet.vue b/test/fixtures/map-hydration/pages/leaflet.vue
new file mode 100644
index 000000000..18d50f15d
--- /dev/null
+++ b/test/fixtures/map-hydration/pages/leaflet.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/map-hydration/pages/maplibre.vue b/test/fixtures/map-hydration/pages/maplibre.vue
new file mode 100644
index 000000000..a2709d929
--- /dev/null
+++ b/test/fixtures/map-hydration/pages/maplibre.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/map-hydration/tsconfig.json b/test/fixtures/map-hydration/tsconfig.json
new file mode 100644
index 000000000..4b34df157
--- /dev/null
+++ b/test/fixtures/map-hydration/tsconfig.json
@@ -0,0 +1,3 @@
+{
+ "extends": "./.nuxt/tsconfig.json"
+}