Clean imports and remove unused

This commit is contained in:
Jarek Rozanski 2023-09-13 14:28:30 +00:00
parent 5414117a3a
commit 3867c24b41
3 changed files with 6 additions and 2 deletions

View file

@ -1,7 +1,9 @@
<template> <template>
<main> <main>
<h1>Nuxt Application</h1> <h1>Nuxt Application</h1>
<button @click="trackClick">Track Click</button> <button @click="trackClick">
Track Click
</button>
</main> </main>
</template> </template>

View file

@ -41,6 +41,8 @@ export default defineNuxtModule<ModuleOptions>({
nuxt.options.build.transpile.push(runtimeDir); nuxt.options.build.transpile.push(runtimeDir);
const resolver = createResolver(import.meta.url); const resolver = createResolver(import.meta.url);
logger.info('Adding Wide Angle Analytics runtime plugin');
addImports({ addImports({
name: "useWaaEvent", name: "useWaaEvent",
as: "useWaaEvent", as: "useWaaEvent",

View file

@ -2,7 +2,7 @@ import { defineNuxtPlugin, useRuntimeConfig } from '#imports';
import { ref } from 'vue'; import { ref } from 'vue';
import { initWideAngle } from 'wideangle-vuejs'; import { initWideAngle } from 'wideangle-vuejs';
export default defineNuxtPlugin((nuxtApp) => { export default defineNuxtPlugin(() => {
if(process.server) { if(process.server) {
console.warn("[WAA] Plugin will not be enabled on server side."); console.warn("[WAA] Plugin will not be enabled on server side.");
return; return;