Skip to content

Commit

Permalink
vercel config fix
Browse files Browse the repository at this point in the history
  • Loading branch information
codecalm committed Oct 25, 2022
1 parent e9f5df4 commit 98df889
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/_includes/layout/analytics.html
@@ -1 +1 @@
<script defer data-domain="{{ site.preview-url | replace: 'https://', '' }}" src="https://plausible.io/js/plausible.js"></script>
<script defer data-api="/stats/api/event" data-domain="{{ site.preview-url | replace: 'https://', '' }}" src="/js/script.js"></script>
10 changes: 10 additions & 0 deletions vercel.json
Expand Up @@ -2,5 +2,15 @@
"routes": [
{ "handle": "filesystem" },
{ "src": "/(.*)", "status": 404, "dest": "/error-404.html" }
],
"rewrites": [
{
"source": "/stats/js/script.js",
"destination": "https://plausible.io/js/script.js"
},
{
"source": "/stats/api/event",
"destination": "https://plausible.io/api/event"
}
]
}

1 comment on commit 98df889

@vercel
Copy link

@vercel vercel bot commented on 98df889 Oct 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment failed with the following error:

If `rewrites`, `redirects`, `headers`, `cleanUrls` or `trailingSlash` are used, then `routes` cannot be present.

Learn More: https://vercel.link/mix-routing-props

Please sign in to comment.