@@ -1058,11 +1058,10 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
10581058 ' };' ,
10591059 ' return <_components.p><_components.em>{"a"}</_components.em></_components.p>;' ,
10601060 '}' ,
1061- 'function MDXContent(props = {}) {' ,
1061+ 'export default function MDXContent(props = {}) {' ,
10621062 ' const {wrapper: MDXLayout} = props.components || ({});' ,
10631063 ' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
10641064 '}' ,
1065- 'export default MDXContent;' ,
10661065 ''
10671066 ] . join ( '\n' )
10681067 )
@@ -1076,11 +1075,10 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
10761075 'function _createMdxContent(props) {' ,
10771076 ' return <a {...b} c d="1" e={1} />;' ,
10781077 '}' ,
1079- 'function MDXContent(props = {}) {' ,
1078+ 'export default function MDXContent(props = {}) {' ,
10801079 ' const {wrapper: MDXLayout} = props.components || ({});' ,
10811080 ' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
10821081 '}' ,
1083- 'export default MDXContent;' ,
10841082 ''
10851083 ] . join ( '\n' )
10861084 )
@@ -1099,11 +1097,10 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
10991097 ' if (!c.d) _missingMdxReference("c.d", true);' ,
11001098 ' return <><><a:b /><c.d /></></>;' ,
11011099 '}' ,
1102- 'function MDXContent(props = {}) {' ,
1100+ 'export default function MDXContent(props = {}) {' ,
11031101 ' const {wrapper: MDXLayout} = props.components || ({});' ,
11041102 ' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
11051103 '}' ,
1106- 'export default MDXContent;' ,
11071104 'function _missingMdxReference(id, component) {' ,
11081105 ' throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it.");' ,
11091106 '}' ,
@@ -1122,11 +1119,10 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
11221119 'function _createMdxContent(props) {' ,
11231120 ' return <><>{"a "}{}{" b"}</></>;' ,
11241121 '}' ,
1125- 'function MDXContent(props = {}) {' ,
1122+ 'export default function MDXContent(props = {}) {' ,
11261123 ' const {wrapper: MDXLayout} = props.components || ({});' ,
11271124 ' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
11281125 '}' ,
1129- 'export default MDXContent;' ,
11301126 ''
11311127 ] . join ( '\n' )
11321128 )
@@ -1146,11 +1142,10 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
11461142 ' }, _component0 = _components["a-b"];' ,
11471143 ' return <>{<_component0></_component0>}</>;' ,
11481144 '}' ,
1149- 'function MDXContent(props = {}) {' ,
1145+ 'export default function MDXContent(props = {}) {' ,
11501146 ' const {wrapper: MDXLayout} = props.components || ({});' ,
11511147 ' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
11521148 '}' ,
1153- 'export default MDXContent;' ,
11541149 ''
11551150 ] . join ( '\n' )
11561151 )
@@ -1169,11 +1164,10 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
11691164 ' };' ,
11701165 ' return <_components.p>{"Hello "}{props.name}</_components.p>;' ,
11711166 '}' ,
1172- 'function MDXContent(props = {}) {' ,
1167+ 'export default function MDXContent(props = {}) {' ,
11731168 ' const {wrapper: MDXLayout} = props.components || ({});' ,
11741169 ' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
11751170 '}' ,
1176- 'export default MDXContent;' ,
11771171 ''
11781172 ] . join ( '\n' )
11791173 )
@@ -1201,10 +1195,9 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
12011195 ' };' ,
12021196 ' return <_components.p>{"a"}</_components.p>;' ,
12031197 '}' ,
1204- 'function MDXContent(props = {}) {' ,
1198+ 'export default function MDXContent(props = {}) {' ,
12051199 ' return <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout>;' ,
12061200 '}' ,
1207- 'export default MDXContent;' ,
12081201 ''
12091202 ] . join ( '\n' )
12101203 )
@@ -1232,15 +1225,13 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
12321225 ' };' ,
12331226 ' return <_components.p>{"a"}</_components.p>;' ,
12341227 '}' ,
1235- 'function MDXContent(props = {}) {' ,
1228+ 'export default function MDXContent(props = {}) {' ,
12361229 ' const {wrapper: MDXLayout} = {' ,
12371230 ' ..._provideComponents(),' ,
12381231 ' ...props.components' ,
12391232 ' };' ,
12401233 ' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
1241-
12421234 '}' ,
1243- 'export default MDXContent;' ,
12441235 ''
12451236 ] . join ( '\n' )
12461237 )
0 commit comments