@@ -1058,11 +1058,10 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
1058
1058
' };' ,
1059
1059
' return <_components.p><_components.em>{"a"}</_components.em></_components.p>;' ,
1060
1060
'}' ,
1061
- 'function MDXContent(props = {}) {' ,
1061
+ 'export default function MDXContent(props = {}) {' ,
1062
1062
' const {wrapper: MDXLayout} = props.components || ({});' ,
1063
1063
' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
1064
1064
'}' ,
1065
- 'export default MDXContent;' ,
1066
1065
''
1067
1066
] . join ( '\n' )
1068
1067
)
@@ -1076,11 +1075,10 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
1076
1075
'function _createMdxContent(props) {' ,
1077
1076
' return <a {...b} c d="1" e={1} />;' ,
1078
1077
'}' ,
1079
- 'function MDXContent(props = {}) {' ,
1078
+ 'export default function MDXContent(props = {}) {' ,
1080
1079
' const {wrapper: MDXLayout} = props.components || ({});' ,
1081
1080
' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
1082
1081
'}' ,
1083
- 'export default MDXContent;' ,
1084
1082
''
1085
1083
] . join ( '\n' )
1086
1084
)
@@ -1099,11 +1097,10 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
1099
1097
' if (!c.d) _missingMdxReference("c.d", true);' ,
1100
1098
' return <><><a:b /><c.d /></></>;' ,
1101
1099
'}' ,
1102
- 'function MDXContent(props = {}) {' ,
1100
+ 'export default function MDXContent(props = {}) {' ,
1103
1101
' const {wrapper: MDXLayout} = props.components || ({});' ,
1104
1102
' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
1105
1103
'}' ,
1106
- 'export default MDXContent;' ,
1107
1104
'function _missingMdxReference(id, component) {' ,
1108
1105
' throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it.");' ,
1109
1106
'}' ,
@@ -1122,11 +1119,10 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
1122
1119
'function _createMdxContent(props) {' ,
1123
1120
' return <><>{"a "}{}{" b"}</></>;' ,
1124
1121
'}' ,
1125
- 'function MDXContent(props = {}) {' ,
1122
+ 'export default function MDXContent(props = {}) {' ,
1126
1123
' const {wrapper: MDXLayout} = props.components || ({});' ,
1127
1124
' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
1128
1125
'}' ,
1129
- 'export default MDXContent;' ,
1130
1126
''
1131
1127
] . join ( '\n' )
1132
1128
)
@@ -1146,11 +1142,10 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
1146
1142
' }, _component0 = _components["a-b"];' ,
1147
1143
' return <>{<_component0></_component0>}</>;' ,
1148
1144
'}' ,
1149
- 'function MDXContent(props = {}) {' ,
1145
+ 'export default function MDXContent(props = {}) {' ,
1150
1146
' const {wrapper: MDXLayout} = props.components || ({});' ,
1151
1147
' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
1152
1148
'}' ,
1153
- 'export default MDXContent;' ,
1154
1149
''
1155
1150
] . join ( '\n' )
1156
1151
)
@@ -1169,11 +1164,10 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
1169
1164
' };' ,
1170
1165
' return <_components.p>{"Hello "}{props.name}</_components.p>;' ,
1171
1166
'}' ,
1172
- 'function MDXContent(props = {}) {' ,
1167
+ 'export default function MDXContent(props = {}) {' ,
1173
1168
' const {wrapper: MDXLayout} = props.components || ({});' ,
1174
1169
' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
1175
1170
'}' ,
1176
- 'export default MDXContent;' ,
1177
1171
''
1178
1172
] . join ( '\n' )
1179
1173
)
@@ -1201,10 +1195,9 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
1201
1195
' };' ,
1202
1196
' return <_components.p>{"a"}</_components.p>;' ,
1203
1197
'}' ,
1204
- 'function MDXContent(props = {}) {' ,
1198
+ 'export default function MDXContent(props = {}) {' ,
1205
1199
' return <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout>;' ,
1206
1200
'}' ,
1207
- 'export default MDXContent;' ,
1208
1201
''
1209
1202
] . join ( '\n' )
1210
1203
)
@@ -1232,15 +1225,13 @@ test('@mdx-js/mdx: compile (JSX)', async function (t) {
1232
1225
' };' ,
1233
1226
' return <_components.p>{"a"}</_components.p>;' ,
1234
1227
'}' ,
1235
- 'function MDXContent(props = {}) {' ,
1228
+ 'export default function MDXContent(props = {}) {' ,
1236
1229
' const {wrapper: MDXLayout} = {' ,
1237
1230
' ..._provideComponents(),' ,
1238
1231
' ...props.components' ,
1239
1232
' };' ,
1240
1233
' return MDXLayout ? <MDXLayout {...props}><_createMdxContent {...props} /></MDXLayout> : _createMdxContent(props);' ,
1241
-
1242
1234
'}' ,
1243
- 'export default MDXContent;' ,
1244
1235
''
1245
1236
] . join ( '\n' )
1246
1237
)
0 commit comments