evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
Build a simple MDX document compiler that can target different JSX frameworks by configuring the JSX runtime.
Create a module that exports a compileForFramework function which compiles MDX content with framework-specific JSX runtime configuration.
The function should:
'react' or 'preact')'preact' as the JSX import source"# Hello\n\nThis is **bold**." and framework 'react', the output includes jsx-runtime imports from React @test"# Hello\n\nThis is **bold**." and framework 'preact', the output includes jsx-runtime imports from Preact @test"<CustomComponent />" and framework 'react', the compiled output correctly handles the JSX element @test/**
* Compiles MDX content for a specific framework.
*
* @param {string} content - The MDX content to compile
* @param {'react' | 'preact'} framework - The target framework
* @returns {Promise<string>} The compiled JavaScript code
*/
export async function compileForFramework(content, framework) {
// Implementation here
}Provides MDX compilation functionality with JSX runtime configuration.