File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,14 @@ import mergeConfig from '../merge_config.js';
1818 */
1919export default async function html ( comments , localConfig = { } ) {
2020 const config = await mergeConfig ( localConfig ) ;
21- const themePath = config . theme && path . resolve ( process . cwd ( ) , config . theme ) ;
21+ let themePath = config . theme && path . resolve ( process . cwd ( ) , config . theme ) ;
2222 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+
2328 return ( await import ( themePath ) ) . default ( comments , config ) ;
2429 }
25-
2630 return ( await import ( '../default_theme/index.js' ) ) . default ( comments , config ) ;
2731}
You can’t perform that action at this time.
0 commit comments