Skip to content

Commit

Permalink
fix: import vite plugin type via dynamic import
Browse files Browse the repository at this point in the history
fix #139
  • Loading branch information
qmhc committed Nov 14, 2022
1 parent aea8ebd commit 8bd73c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/plugin.ts
Expand Up @@ -29,12 +29,11 @@ import {
removeDirIfEmpty
} from './utils'

import type { Plugin, Alias, Logger } from 'vite'
import type { Alias, Logger } from 'vite'
import type { SourceFile } from 'ts-morph'
import type { PluginOptions } from './types'

const noneExport = 'export {};\n'
// const virtualPrefix = '\0'
const vueRE = /\.vue$/
const tsRE = /\.(m|c)?tsx?$/
const jsRE = /\.(m|c)?jsx?$/
Expand All @@ -49,7 +48,7 @@ const noop = () => {}
const logPrefix = cyan('[vite:dts]')
const bundleDebug = debug('vite-plugin-dts:bundle')

export function dtsPlugin(options: PluginOptions = {}): Plugin {
export function dtsPlugin(options: PluginOptions = {}): import('vite').Plugin {
const {
tsConfigFilePath = 'tsconfig.json',
aliasesExclude = [],
Expand Down

0 comments on commit 8bd73c8

Please sign in to comment.