Skip to content

Commit fb5dfce

Browse files
authored
Allow nextjsExports to be optional (#47)
fixes markdoc/markdoc#464
1 parent 437cd88 commit fb5dfce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ async function load(source) {
6161
options: {slots = false, ...options} = {
6262
allowComments: true,
6363
},
64+
nextjsExports = ['metadata', 'revalidate'],
6465
appDir = false,
6566
} = this.getOptions() || {};
6667

@@ -128,7 +129,6 @@ async function load(source) {
128129

129130
this.addContextDependency(schemaDir);
130131

131-
const nextjsExports = ['metadata', 'revalidate'];
132132
const nextjsExportsCode = nextjsExports
133133
.map((name) => `export const ${name} = frontmatter.nextjs?.${name};`)
134134
.join('\n');

0 commit comments

Comments
 (0)