fix(docs): use dynamic import for globby ESM module (#6636)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { globby } = require('globby');
|
||||
|
||||
module.exports = function markdownExportPlugin(context, options) {
|
||||
const pluginOptions = {
|
||||
@@ -18,6 +17,8 @@ module.exports = function markdownExportPlugin(context, options) {
|
||||
|
||||
console.log('[markdown-export] Starting markdown export...');
|
||||
|
||||
const globby = (await import('globby')).default;
|
||||
|
||||
const docsDir = path.join(context.siteDir, 'docs');
|
||||
const outputDir = path.join(outDir, 'docs');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user