From 6b726dc9a044dbecb944132a5ba7f43771b0af93 Mon Sep 17 00:00:00 2001 From: javad mnjd Date: Fri, 10 May 2024 08:43:08 +0330 Subject: [PATCH] fix: add types to package.json exports (#268) --- package.json | 5 +++-- src/module.ts | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 08d6f049..303d8184 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nuxt-svgo", - "version": "4.0.0", + "version": "4.0.1", "description": "Nuxt module to load optimized SVG files as Vue components", "keywords": [ "nuxt", @@ -19,7 +19,8 @@ "exports": { ".": { "import": "./dist/module.mjs", - "require": "./dist/module.cjs" + "require": "./dist/module.cjs", + "types": "./dist/module.d.ts" } }, "main": "./dist/module.cjs", diff --git a/src/module.ts b/src/module.ts index c334f12e..cb8bf26d 100644 --- a/src/module.ts +++ b/src/module.ts @@ -9,7 +9,9 @@ import { } from '@nuxt/kit' import type { NuxtModule } from '@nuxt/schema' import type { Config } from 'svgo' -import { SvgLoaderOptions, svgLoader } from './loaders/vite' +import { type SvgLoaderOptions, svgLoader } from './loaders/vite' + +export type { SvgLoaderOptions } /** * taken from: https://stackoverflow.com/a/8831937/3542461