Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Oct 26, 2024
1 parent ff4afd8 commit 539b501
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions packages/peggy-loader/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@ import type {
import peggy from 'peggy';
import type { LoaderContext } from 'webpack';

type Options =
| BuildOptionsBase &
(
| Omit<
OutputFormatAmdCommonjsEs<'source'>,
keyof SourceOptionsBase<'source'>
>
| Omit<OutputFormatUmd<'source'>, keyof SourceOptionsBase<'source'>>
| Omit<OutputFormatGlobals<'source'>, keyof SourceOptionsBase<'source'>>
| Omit<OutputFormatBare<'source'>, keyof SourceOptionsBase<'source'>>
);
type Options = BuildOptionsBase &
(
| Omit<
OutputFormatAmdCommonjsEs<'source'>,
keyof SourceOptionsBase<'source'>
>
| Omit<OutputFormatUmd<'source'>, keyof SourceOptionsBase<'source'>>
| Omit<OutputFormatGlobals<'source'>, keyof SourceOptionsBase<'source'>>
| Omit<OutputFormatBare<'source'>, keyof SourceOptionsBase<'source'>>
);

function peggyLoader(
this: LoaderContext<Options>,
grammarContent: string
grammarContent: string,
): string {
const options: Options = {
format: 'commonjs',
Expand Down

0 comments on commit 539b501

Please sign in to comment.