Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
montalvomiguelo committed Sep 29, 2024
1 parent a535326 commit 6c4919a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,10 @@ Specifies the file name of the snippet that loads your assets.
- **Default:** `false`

Specifies whether to append version numbers to your production-ready asset URLs in [`snippetFile`](/guide/configuration.html#snippetfile).

## tunnel

- **Type:** `boolean | string`
- **Default:** `false`

Enables the creation of Cloudflare tunnels during dev, allowing previews from any device.
21 changes: 21 additions & 0 deletions docs/guide/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,24 @@ export default {
]
}
```

## Use ngrok for tunneling during theme development

If you are experiencing Cloudflare tunnel errors with the Shopify Vite Plugin, you can use ngrok as a workaround.
First, create an ngrok account and install the ngrok CLI, then follow their instructions to set up your access token.
Next, run the command `ngrok http 3000` (or any other port number you prefer) and take note of the URL
provided by ngrok, which ends with `ngrok-free.app`. Keep ngrok running. Finally, configure the plugin.

::: code-group

```js [vite.config.js]
import shopify from 'vite-plugin-shopify'

export default {
plugins: [
shopify({
tunnel: 'https://123abc.ngrok-free.app:3000' // [!code ++]
})
]
}
```
4 changes: 3 additions & 1 deletion packages/vite-plugin-shopify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ export default {
// Specifies the file name of the snippet that loads your assets
snippetFile: 'vite-tag.liquid',
// Specifies whether to append version numbers to your production-ready asset URLs in `snippetFile`
versionNumbers: false
versionNumbers: false,
// Enables the creation of Cloudflare tunnels during dev, allowing previews from any device
tunnel: false
})
]
}
Expand Down

0 comments on commit 6c4919a

Please sign in to comment.