/
githubmirror
/
reveal.js
Обзор
Документация
Войти
/
githubmirror
/
reveal.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
plugin/vite-plugin-dts.ts
23 строки
548 B
Hakim El Hattab
6.0.1, update build to maintain dts output paths
11 апр 2026, 10:16
11 апр 2026, 10:16
52c6c8b
Код
Авторство
О чём код?
import { resolve } from 'node:path'; import dts from 'vite-plugin-dts'; import { rewriteLegacyPluginDtsPath } from '../build/dts-paths.ts'; export function createPluginDts(pluginName: string) { return dts({ include: [`plugin/${pluginName}/index.ts`], entryRoot: 'plugin', outDir: 'dist/plugin', beforeWriteFile(filePath, content) { const rewrittenPath = rewriteLegacyPluginDtsPath(filePath, pluginName); if (!rewrittenPath) { return false; } return { filePath: resolve(rewrittenPath), content, }; }, }); }