diff --git a/nuxt-module/src/module.ts b/nuxt-module/src/module.ts index 1b0ad622..60c8680f 100644 --- a/nuxt-module/src/module.ts +++ b/nuxt-module/src/module.ts @@ -1,6 +1,6 @@ import { defineNuxtModule, addPlugin, createResolver, addImports } from '@nuxt/kit' -import * as utils from './runtime/utils/index' +import * as utils from '../../dist/index' // Module options TypeScript interface definition export interface ModuleOptions {} @@ -18,13 +18,14 @@ export default defineNuxtModule({ const { resolve } = createResolver(import.meta.url) const aliasMap = new Map(options.alias) + for (const name of Object.keys(utils)) { const alias = aliasMap.has(name) ? aliasMap.get(name!) : name console.debug(`Adding ${name} as ${alias}`) addImports({ name: name, as: alias, - from: resolve('./runtime/utils/index.ts') + from: resolve('../../dist/index') }) } diff --git a/nuxt-module/src/runtime/utils/index.ts b/nuxt-module/src/runtime/utils/index.ts deleted file mode 100644 index bd315855..00000000 --- a/nuxt-module/src/runtime/utils/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '../../../../dist/index'