File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 44 */
55
66import path from 'node:path' ;
7+ import { pathToFileURL } from 'node:url' ;
78
89import globToRegExp from 'glob-to-regexp' ;
910
@@ -35,11 +36,11 @@ export async function loadStaticPublisherRcFile(): Promise<StaticPublishRc> {
3536
3637 const configFile = './static-publish.rc.js' ;
3738
39+ const configFilePath = path . resolve ( configFile ) ;
3840 try {
39- const filePath = path . resolve ( configFile ) ;
40- configRaw = ( await import ( filePath ) ) . default ;
41- } catch {
42- //
41+ configRaw = ( await import ( pathToFileURL ( configFilePath ) . href ) ) . default ;
42+ } catch ( ex ) {
43+ console . log ( 'Unable to load ' + configFilePath , String ( ex ) ) ;
4344 }
4445
4546 if ( configRaw == null ) {
@@ -128,11 +129,11 @@ export async function loadPublishContentConfigFile(configFile: string): Promise<
128129
129130 let configRaw ;
130131
132+ const configFilePath = path . resolve ( configFile ) ;
131133 try {
132- const filePath = path . resolve ( configFile ) ;
133- configRaw = ( await import ( filePath ) ) . default ;
134- } catch {
135- //
134+ configRaw = ( await import ( pathToFileURL ( configFilePath ) . href ) ) . default ;
135+ } catch ( ex ) {
136+ console . log ( 'Unable to load ' + configFilePath , String ( ex ) ) ;
136137 }
137138
138139 if ( configRaw == null ) {
You can’t perform that action at this time.
0 commit comments