Skip to content

Commit

Permalink
feat: add vercel analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
loke-dev committed Jun 25, 2023
1 parent 545262e commit d87a593
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"dependencies": {
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/typography": "^0.5.9",
"@vercel/analytics": "^1.0.1",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.1.0",
"remark-abbr": "^1.4.1",
Expand Down
14 changes: 3 additions & 11 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
<script lang="ts">
import { onMount } from "svelte"
// import splitbee from "@splitbee/web"
// import { dev } from "$app/env"
import Header from "$src/lib/components/Header.svelte"
import Footer from "$src/lib/components/Footer.svelte"
import { dev } from '$app/environment'
import { inject } from '@vercel/analytics'
import "$styles/app.css"
// onMount(() => {
// if (!dev) {
// splitbee.init({
// scriptUrl: "/bee.js",
// apiUrl: "/_hive",
// })
// }
// })
inject({ mode: dev ? 'development' : 'production' })
</script>

<svelte:head>
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,11 @@
"@typescript-eslint/types" "5.52.0"
eslint-visitor-keys "^3.3.0"

"@vercel/analytics@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@vercel/analytics/-/analytics-1.0.1.tgz#38308a626c91866cb00a249c08bf65251e9b9d81"
integrity sha512-Ux0c9qUfkcPqng3vrR0GTrlQdqNJ2JREn/2ydrVuKwM3RtMfF2mWX31Ijqo1opSjNAq6rK76PwtANw6kl6TAow==

"@vitest/[email protected]":
version "0.28.5"
resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.28.5.tgz#d5a6eccd014e9ad66fe87a20d16426a2815c0e8a"
Expand Down

0 comments on commit d87a593

Please sign in to comment.