Skip to content

Commit

Permalink
Merge pull request #12 from joshwooding/joshwooding-patch-1
Browse files Browse the repository at this point in the history
Fix skipCsf support in compile functions
  • Loading branch information
shilman authored Jun 25, 2022
2 parents 1d352f1 + ab2c9f7 commit 366baae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import mdx from '@mdx-js/mdx';
import { createCompiler, MdxOptions } from './sb-mdx-plugin';

export const compile = async (code: string, options?: MdxOptions) =>
mdx(code, { compilers: options?.skipCsf ? undefined : [createCompiler(options)] });
mdx(code, { compilers: options?.skipCsf ? [] : [createCompiler(options)] });

export const compileSync = (code: string, options?: MdxOptions) =>
mdx.sync(code, { compilers: options?.skipCsf ? undefined : [createCompiler(options)] });
mdx.sync(code, { compilers: options?.skipCsf ? [] : [createCompiler(options)] });

export * from './sb-mdx-plugin';

0 comments on commit 366baae

Please sign in to comment.