Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support skipCsf option in compile functions #2

Conversation

joshwooding
Copy link
Member

@joshwooding joshwooding commented May 14, 2022

Issue: #

What Changed

This will allow the vite builder to use the compile function on non-story mdx files.

How to test

Change Type

  • maintenance
  • documentation
  • patch
  • minor
  • major

@joshwooding joshwooding requested a review from shilman May 14, 2022 18:59
src/index.ts Outdated
@@ -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: [createCompiler(options)] });
mdx(code, { compilers: options.skipCsf ? [] : [createCompiler(options)] });
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically skipCsf will be passed to createCompiler but these options are ignored anyway

@joshwooding joshwooding force-pushed the support-skipcsf-compile branch from 8161d3b to fa6f535 Compare May 18, 2022 16:25
@shilman shilman deleted the branch storybookjs:mdx1-support May 23, 2022 11:17
@shilman shilman closed this May 23, 2022
@IanVS
Copy link
Member

IanVS commented May 25, 2022

Was this fixed elsewhere?

@shilman
Copy link
Member

shilman commented Jun 7, 2022

@joshwooding it seems like GH automatically closed this PR when I deleted the base branch. Can you re-open if this is still relevant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants