@@ -74,25 +74,25 @@ describe(`webpack loader: loads and injects Gatsby layout component`, () => {
74
74
"import React from \\"react\\";
75
75
import GATSBY_COMPILED_MDX from \\"/mocked-layout.ts?contentFilePath=/mocked-content.mdx\\";
76
76
import {Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs} from \\"react/jsx-runtime\\";
77
+ function _createMdxContent(props) {
78
+ const _components = Object.assign({
79
+ h1: \\"h1\\",
80
+ p: \\"p\\"
81
+ }, props.components), {Example} = _components;
82
+ if (!Example) _missingMdxReference(\\"Example\\", true);
83
+ return _jsxs(_Fragment, {
84
+ children: [_jsx(_components.h1, {
85
+ children: \\"Layout test\\"
86
+ }), \\"/n\\", _jsx(_components.p, {
87
+ children: \\"Does it wrap?\\"
88
+ }), \\"/n\\", _jsx(Example, {})]
89
+ });
90
+ }
77
91
function MDXContent(props = {}) {
78
92
const {wrapper: MDXLayout} = props.components || ({});
79
93
return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, {
80
- children: _jsx(_createMdxContent, {})
81
- })) : _createMdxContent();
82
- function _createMdxContent() {
83
- const _components = Object.assign({
84
- h1: \\"h1\\",
85
- p: \\"p\\"
86
- }, props.components), {Example} = _components;
87
- if (!Example) _missingMdxReference(\\"Example\\", true);
88
- return _jsxs(_Fragment, {
89
- children: [_jsx(_components.h1, {
90
- children: \\"Layout test\\"
91
- }), \\"/n\\", _jsx(_components.p, {
92
- children: \\"Does it wrap?\\"
93
- }), \\"/n\\", _jsx(Example, {})]
94
- });
95
- }
94
+ children: _jsx(_createMdxContent, props)
95
+ })) : _createMdxContent(props);
96
96
}
97
97
MDXContent
98
98
export default function GatsbyMDXWrapper(props) {
@@ -115,24 +115,24 @@ describe(`webpack loader: loads and injects Gatsby layout component`, () => {
115
115
import {Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs} from \\"react/jsx-runtime\\";
116
116
import TemplateComponent from \\"./some-path\\";
117
117
const MDXLayout = TemplateComponent;
118
+ function _createMdxContent(props) {
119
+ const _components = Object.assign({
120
+ h1: \\"h1\\",
121
+ p: \\"p\\"
122
+ }, props.components), {Example} = _components;
123
+ if (!Example) _missingMdxReference(\\"Example\\", true);
124
+ return _jsxs(_Fragment, {
125
+ children: [_jsx(_components.h1, {
126
+ children: \\"Layout test\\"
127
+ }), \\"/n\\", _jsx(_components.p, {
128
+ children: \\"Does it wrap?\\"
129
+ }), \\"/n\\", _jsx(Example, {})]
130
+ });
131
+ }
118
132
function MDXContent(props = {}) {
119
- return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, {
120
- children: _jsx(_createMdxContent, {})
121
- })) : _createMdxContent();
122
- function _createMdxContent() {
123
- const _components = Object.assign({
124
- h1: \\"h1\\",
125
- p: \\"p\\"
126
- }, props.components), {Example} = _components;
127
- if (!Example) _missingMdxReference(\\"Example\\", true);
128
- return _jsxs(_Fragment, {
129
- children: [_jsx(_components.h1, {
130
- children: \\"Layout test\\"
131
- }), \\"/n\\", _jsx(_components.p, {
132
- children: \\"Does it wrap?\\"
133
- }), \\"/n\\", _jsx(Example, {})]
134
- });
135
- }
133
+ return _jsx(MDXLayout, Object.assign({}, props, {
134
+ children: _jsx(_createMdxContent, props)
135
+ }));
136
136
}
137
137
MDXContent
138
138
export default function GatsbyMDXWrapper(props) {
@@ -152,24 +152,24 @@ describe(`webpack loader: loads and injects Gatsby layout component`, () => {
152
152
import GATSBY_COMPILED_MDX from \\"/mocked-layout.ts?contentFilePath=/mocked-content.mdx\\";
153
153
import {Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs} from \\"react/jsx-runtime\\";
154
154
import MDXLayout from \\"./some-path\\";
155
+ function _createMdxContent(props) {
156
+ const _components = Object.assign({
157
+ h1: \\"h1\\",
158
+ p: \\"p\\"
159
+ }, props.components), {Example} = _components;
160
+ if (!Example) _missingMdxReference(\\"Example\\", true);
161
+ return _jsxs(_Fragment, {
162
+ children: [_jsx(_components.h1, {
163
+ children: \\"Layout test\\"
164
+ }), \\"/n\\", _jsx(_components.p, {
165
+ children: \\"Does it wrap?\\"
166
+ }), \\"/n\\", _jsx(Example, {})]
167
+ });
168
+ }
155
169
function MDXContent(props = {}) {
156
- return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, {
157
- children: _jsx(_createMdxContent, {})
158
- })) : _createMdxContent();
159
- function _createMdxContent() {
160
- const _components = Object.assign({
161
- h1: \\"h1\\",
162
- p: \\"p\\"
163
- }, props.components), {Example} = _components;
164
- if (!Example) _missingMdxReference(\\"Example\\", true);
165
- return _jsxs(_Fragment, {
166
- children: [_jsx(_components.h1, {
167
- children: \\"Layout test\\"
168
- }), \\"/n\\", _jsx(_components.p, {
169
- children: \\"Does it wrap?\\"
170
- }), \\"/n\\", _jsx(Example, {})]
171
- });
172
- }
170
+ return _jsx(MDXLayout, Object.assign({}, props, {
171
+ children: _jsx(_createMdxContent, props)
172
+ }));
173
173
}
174
174
MDXContent
175
175
export default function GatsbyMDXWrapper(props) {
@@ -189,24 +189,24 @@ describe(`webpack loader: loads and injects Gatsby layout component`, () => {
189
189
import GATSBY_COMPILED_MDX from \\"/mocked-layout.ts?contentFilePath=/mocked-content.mdx\\";
190
190
import {Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs} from \\"react/jsx-runtime\\";
191
191
import {Layout as MDXLayout} from \\"./some-path\\";
192
+ function _createMdxContent(props) {
193
+ const _components = Object.assign({
194
+ h1: \\"h1\\",
195
+ p: \\"p\\"
196
+ }, props.components), {Example} = _components;
197
+ if (!Example) _missingMdxReference(\\"Example\\", true);
198
+ return _jsxs(_Fragment, {
199
+ children: [_jsx(_components.h1, {
200
+ children: \\"Layout test\\"
201
+ }), \\"/n\\", _jsx(_components.p, {
202
+ children: \\"Does it wrap?\\"
203
+ }), \\"/n\\", _jsx(Example, {})]
204
+ });
205
+ }
192
206
function MDXContent(props = {}) {
193
- return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, {
194
- children: _jsx(_createMdxContent, {})
195
- })) : _createMdxContent();
196
- function _createMdxContent() {
197
- const _components = Object.assign({
198
- h1: \\"h1\\",
199
- p: \\"p\\"
200
- }, props.components), {Example} = _components;
201
- if (!Example) _missingMdxReference(\\"Example\\", true);
202
- return _jsxs(_Fragment, {
203
- children: [_jsx(_components.h1, {
204
- children: \\"Layout test\\"
205
- }), \\"/n\\", _jsx(_components.p, {
206
- children: \\"Does it wrap?\\"
207
- }), \\"/n\\", _jsx(Example, {})]
208
- });
209
- }
207
+ return _jsx(MDXLayout, Object.assign({}, props, {
208
+ children: _jsx(_createMdxContent, props)
209
+ }));
210
210
}
211
211
MDXContent
212
212
export default function GatsbyMDXWrapper(props) {
0 commit comments