vendor: support native TypeScript source loading

This commit is contained in:
imccyu
2026-07-28 23:03:23 +08:00
parent eb38a365dc
commit 5ea161fa68
23 changed files with 77 additions and 72 deletions

View File

@@ -1,5 +1,5 @@
import { Context } from 'cordis'
import { BuildFailure } from 'esbuild'
import type { BuildFailure } from 'esbuild'
import { codeFrameColumns } from '@babel/code-frame'
import { readFileSync } from 'node:fs'

View File

@@ -1,8 +1,8 @@
import { Context, Inject, Plugin, Service } from 'cordis'
import { Dict } from 'cosmokit'
import { ModuleJob, ModuleLoader, ResolveResult } from '@cordisjs/plugin-loader'
import { Context, Inject, Service, type Plugin } from 'cordis'
import type { Dict } from 'cosmokit'
import { ModuleLoader, type ModuleJob, type ResolveResult } from '@cordisjs/plugin-loader'
import type { Include } from '@cordisjs/plugin-include'
import { ChokidarOptions, FSWatcher, watch } from 'chokidar'
import { FSWatcher, watch, type ChokidarOptions } from 'chokidar'
import { relative, resolve } from 'node:path'
import { handleError } from './error.ts'
import type {} from '@cordisjs/plugin-timer'