We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent0037954 commit8d029e7Copy full SHA for 8d029e7
src/output/html.js
@@ -18,10 +18,14 @@ import mergeConfig from '../merge_config.js';
18
*/
19
exportdefaultasyncfunctionhtml(comments,localConfig={}){
20
constconfig=awaitmergeConfig(localConfig);
21
-constthemePath=config.theme&&path.resolve(process.cwd(),config.theme);
+letthemePath=config.theme&&path.resolve(process.cwd(),config.theme);
22
if(themePath){
23
+if(process.platform==='win32'){
24
+// On Windows, absolute paths must be prefixed with 'file:///' to avoid the ERR_UNSUPPORTED_ESM_URL_SCHEME error from import().
25
+themePath='file:///'+themePath;
26
+}
27
+
28
return(awaitimport(themePath)).default(comments,config);
29
}
-
30
return(awaitimport('../default_theme/index.js')).default(comments,config);
31