From 2be8cd2f3b66dc3645dbb6cb5dd35cd969baa53e Mon Sep 17 00:00:00 2001 From: miguel Date: Mon, 19 Jan 2026 10:26:13 -0600 Subject: [PATCH 1/5] Docs update --- docs/guide/troubleshooting.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md index eb55244..c866753 100644 --- a/docs/guide/troubleshooting.md +++ b/docs/guide/troubleshooting.md @@ -129,7 +129,10 @@ allowing the Theme Editor to bypass the restriction and correctly load your loca server: { + allowedHosts: ['.trycloudflare.com'], cors: { - origin: [defaultAllowedOrigins, /\.myshopify\.com$/] + origin: [ + /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/, + /\.myshopify\.com$/ + ] } }, build: { From ab5870dc105afaed041913ee5cdd28ebb35c23e4 Mon Sep 17 00:00:00 2001 From: miguel Date: Mon, 19 Jan 2026 10:40:01 -0600 Subject: [PATCH 2/5] Docs update --- docs/guide/troubleshooting.md | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md index c866753..67d5e47 100644 --- a/docs/guide/troubleshooting.md +++ b/docs/guide/troubleshooting.md @@ -110,6 +110,7 @@ export default { ] } ``` +::: ## Chrome Local Network Access Update & Tunnel Fix @@ -121,22 +122,22 @@ allowing the Theme Editor to bypass the restriction and correctly load your loca ::: code-group -```diff [vite.config.js] - // https://vitejs.dev/config/ - export default defineConfig({ -- plugins: [shopify(), tailwindcss()], -+ plugins: [shopify({ tunnel: true }), tailwindcss()], - server: { -+ allowedHosts: ['.trycloudflare.com'], - cors: { - origin: [ - /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/, - /\.myshopify\.com$/ - ] - } - }, - build: { - rollupOptions: { +```js [vite.config.js] +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [shopify(), tailwindcss()], // [!code --] + plugins: [shopify({ tunnel: true }), tailwindcss()], // [!code ++] + server: { + allowedHosts: [".trycloudflare.com"], // [!code ++] + cors: { + origin: [ + /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/, + /\.myshopify\.com$/, + ], + }, + }, + build: { + rollupOptions: { ``` ::: From 31b01889082bb8bdcf2736ab6a639a008fb08ae6 Mon Sep 17 00:00:00 2001 From: miguel Date: Mon, 19 Jan 2026 10:46:40 -0600 Subject: [PATCH 3/5] Docs update --- docs/guide/troubleshooting.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md index 67d5e47..489ddb1 100644 --- a/docs/guide/troubleshooting.md +++ b/docs/guide/troubleshooting.md @@ -128,13 +128,13 @@ export default defineConfig({ plugins: [shopify(), tailwindcss()], // [!code --] plugins: [shopify({ tunnel: true }), tailwindcss()], // [!code ++] server: { - allowedHosts: [".trycloudflare.com"], // [!code ++] + allowedHosts: ['.trycloudflare.com'], // [!code ++] cors: { origin: [ /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/, - /\.myshopify\.com$/, - ], - }, + /\.myshopify\.com$/ + ] + } }, build: { rollupOptions: { From 65aae1c3ad31c19b8035b621bca1934dd44e1864 Mon Sep 17 00:00:00 2001 From: miguel Date: Mon, 19 Jan 2026 11:00:03 -0600 Subject: [PATCH 4/5] Docs update --- docs/guide/troubleshooting.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md index 489ddb1..164fcdc 100644 --- a/docs/guide/troubleshooting.md +++ b/docs/guide/troubleshooting.md @@ -120,6 +120,10 @@ To fix this, we recommend enabling the [`tunnel`](https://shopify-vite.barrelny. Alternatively, you can use external tools like ngrok to manually expose your server. Both methods create a public HTTPS connection, allowing the Theme Editor to bypass the restriction and correctly load your local assets. +::: tip Automatic Configuration (v4.1.0+) +Since v4.1.0, the plugin automatically sets CORS defaults. When `tunnel: true` is enabled, it also configures allowed hosts. Your custom settings will always take precedence. +::: + ::: code-group ```js [vite.config.js] From 1dcfc9922f84798744f68513a2d66b881a02d3a8 Mon Sep 17 00:00:00 2001 From: miguel Date: Mon, 19 Jan 2026 11:12:36 -0600 Subject: [PATCH 5/5] Docs update --- docs/guide/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md index 164fcdc..69f58dc 100644 --- a/docs/guide/troubleshooting.md +++ b/docs/guide/troubleshooting.md @@ -121,7 +121,7 @@ Alternatively, you can use external tools like ngrok to manually expose your ser allowing the Theme Editor to bypass the restriction and correctly load your local assets. ::: tip Automatic Configuration (v4.1.0+) -Since v4.1.0, the plugin automatically sets CORS defaults. When `tunnel: true` is enabled, it also configures allowed hosts. Your custom settings will always take precedence. +Since v4.1.0, the plugin automatically sets `server.cors` defaults. When `tunnel: true` is enabled, it also configures `server.allowedHosts`. Your custom settings will always take precedence. ::: ::: code-group