Skip to content

Commit

Permalink
feat: improve types
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Oct 18, 2023
1 parent a0e023e commit db15d59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/astro/src/core/build/plugins/util.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { extname } from 'node:path';
import type { Plugin as VitePlugin } from 'vite';
import type { Rollup, Plugin as VitePlugin } from 'vite';

// eslint-disable-next-line @typescript-eslint/ban-types
type OutputOptionsHook = Extract<VitePlugin['outputOptions'], Function>;
type OutputOptions = Parameters<OutputOptionsHook>[0];

type ExtendManualChunksHooks = {
before?: (id: string, meta: any) => string | undefined;
after?: (id: string, meta: any) => string | undefined;
before?: Rollup.GetManualChunk;
after?: Rollup.GetManualChunk;
};

export function extendManualChunks(outputOptions: OutputOptions, hooks: ExtendManualChunksHooks) {
Expand Down

0 comments on commit db15d59

Please sign in to comment.