diff --git a/nuxt.config.ts b/nuxt.config.ts index 10df92aa..7a9ee367 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -76,15 +76,21 @@ export default defineNuxtConfig({ }, }, + plausible: { + domain: 'roe.dev', + }, + modules: [ '@nuxtjs/tailwindcss', '@nuxtjs/color-mode', '@nuxt/content', + 'vue-plausible', defineNuxtModule({ setup(_options, nuxt) { const { dst } = addTemplate({ filename: 'legacy-app-stub.mjs', - getContents: () => `export const legacyPlugin = () => {}`, + getContents: () => + `export const legacyPlugin = (nuxtApp) => { nuxtApp._legacyContext = nuxtApp }`, }) nuxt.options.alias['./compat/legacy-app.mjs'] = dst nuxt.hook('app:templates', app => { diff --git a/package.json b/package.json index 0af16f7a..5ce6ce38 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "dependencies": { "@nuxt/content": "npm:@nuxt/content-edge@latest", "@nuxt/kit": "3.0.0-rc.4", - "prism-themes": "1.9.0" + "prism-themes": "1.9.0", + "vue-plausible": "^1.3.1" }, "devDependencies": { "@commitlint/cli": "17.0.3", @@ -39,7 +40,7 @@ "eslint-config-prettier": "8.5.0", "eslint-plugin-nuxt": "3.2.0", "eslint-plugin-prettier": "4.0.0", - "happy-dom": "^5.0.0", + "happy-dom": "^5.3.2", "husky": "8.0.1", "lint-staged": "13.0.3", "nuxt": "npm:nuxt3@latest", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 02c0c9fa..46d7cb76 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,10 +32,12 @@ importers: stylelint-config-recommended-vue: 1.4.0 stylelint-config-standard: 26.0.0 vitest: ^0.16.0 + vue-plausible: ^1.3.1 dependencies: '@nuxt/content': /@nuxt/content-edge/2.0.1-27601186.8c7a185 '@nuxt/kit': 3.0.0-rc.4 prism-themes: 1.9.0 + vue-plausible: 1.3.1 devDependencies: '@commitlint/cli': 17.0.3 '@commitlint/config-conventional': 17.0.3 @@ -6898,6 +6900,11 @@ packages: mlly: 0.5.3 pathe: 0.3.0 + /plausible-tracker/0.3.8: + resolution: {integrity: sha512-lmOWYQ7s9KOUJ1R+YTOR3HrjdbxIS2Z4de0P/Jx2dQPteznJl2eX3tXxKClpvbfyGP59B5bbhW8ftN59HbbFSg==} + engines: {node: '>=10'} + dev: false + /pluralize/8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} @@ -9490,6 +9497,12 @@ packages: - supports-color dev: true + /vue-plausible/1.3.1: + resolution: {integrity: sha512-OqZiScz/7glitE4XSJTwGUHO31VEbba2efmLki0+rIGDx3NysSOBJMyFz6yBFPWKms4jb1lDmx1wCsbAl7mrtA==} + dependencies: + plausible-tracker: 0.3.8 + dev: false + /vue-router/4.0.16_vue@3.2.37: resolution: {integrity: sha512-JcO7cb8QJLBWE+DfxGUL3xUDOae/8nhM1KVdnudadTAORbuxIC/xAydC5Zr/VLHUDQi1ppuTF5/rjBGzgzrJNA==} peerDependencies: