diff --git a/src/module.ts b/src/module.ts index 64a503e..ff81372 100644 --- a/src/module.ts +++ b/src/module.ts @@ -1,5 +1,4 @@ -import { defineNuxtModule, addComponent, addPlugin } from '@nuxt/kit' -import path from 'path' +import { defineNuxtModule, addComponent } from '@nuxt/kit' // Module options TypeScript interface definition export interface ModuleOptions {} @@ -43,12 +42,6 @@ export default defineNuxtModule({ // Add Leaflet's CSS nuxt.options.css.push('leaflet/dist/leaflet.css') - // Add Leaflet's JS - addPlugin({ - src: path.resolve(__dirname, 'runtime/leaflet-runtime'), - mode: 'client' - }) - // Export Vue Leaflet components for (const component of components) { addComponent({ diff --git a/src/runtime/leaflet-runtime.ts b/src/runtime/leaflet-runtime.ts deleted file mode 100644 index bf2f325..0000000 --- a/src/runtime/leaflet-runtime.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Nuxt plugin to import and expose Leaflet to the Nuxt context - */ -import * as leaflet from 'leaflet' -import { defineNuxtPlugin } from 'nuxt/app' - -export default defineNuxtPlugin((nuxtApp) => { - nuxtApp.L = leaflet -})