@@ -16,10 +16,10 @@ export async function createMerkurConfig({ cliConfig, context, args } = {}) {
16
16
17
17
try {
18
18
logger . debug (
19
- `Load merkur config on path ${ projectFolder } /${ MERKUR_CONFIG_FILE } ` ,
19
+ `Load merkur config on path ${ path . resolve ( ` ${ projectFolder } /${ MERKUR_CONFIG_FILE } ` ) } ` ,
20
20
) ;
21
21
22
- const file = await import ( `${ projectFolder } /${ MERKUR_CONFIG_FILE } ` ) ;
22
+ const file = await import ( path . resolve ( `${ projectFolder } /${ MERKUR_CONFIG_FILE } ` ) ) ;
23
23
merkurConfig = await file . default ( {
24
24
cliConfig,
25
25
context,
@@ -28,6 +28,7 @@ export async function createMerkurConfig({ cliConfig, context, args } = {}) {
28
28
} ) ;
29
29
} catch ( error ) {
30
30
logger . error ( error ) ;
31
+ process . exit ( 1 ) ;
31
32
}
32
33
33
34
cliConfig = { ...cliConfig , ...( merkurConfig ?. cliConfig ?? { } ) , ...args } ;
@@ -101,7 +102,7 @@ emitter.on(
101
102
folder : 'es13' ,
102
103
build : {
103
104
platform : 'browser' ,
104
- outdir : `${ staticFolder } /es13` ,
105
+ outdir : path . resolve ( `${ staticFolder } /es13` ) ,
105
106
plugins : [ devPlugin ] ,
106
107
} ,
107
108
} ,
@@ -111,7 +112,7 @@ emitter.on(
111
112
build : {
112
113
platform : 'browser' ,
113
114
target : 'es2018' ,
114
- outdir : `${ staticFolder } /es9` ,
115
+ outdir : path . resolve ( `${ staticFolder } /es9` ) ,
115
116
} ,
116
117
} ,
117
118
} ;
@@ -172,8 +173,8 @@ emitter.on(
172
173
EMITTER_EVENTS . MERKUR_CONFIG ,
173
174
function defaultEntries ( { merkurConfig, cliConfig } ) {
174
175
merkurConfig . defaultEntries = {
175
- client : [ `${ cliConfig . projectFolder } /src/entries/client.js` ] ,
176
- server : [ `${ cliConfig . projectFolder } /src/entries/server.js` ] ,
176
+ client : [ path . resolve ( `${ cliConfig . projectFolder } /src/entries/client.js` ) ] ,
177
+ server : [ path . resolve ( `${ cliConfig . projectFolder } /src/entries/server.js` ) ] ,
177
178
...merkurConfig . defaultEntries ,
178
179
} ;
179
180
@@ -185,8 +186,8 @@ emitter.on(
185
186
EMITTER_EVENTS . MERKUR_CONFIG ,
186
187
function playground ( { merkurConfig, cliConfig } ) {
187
188
merkurConfig . playground = {
188
- template : `${ cliConfig . cliFolder } /templates/playground.ejs` ,
189
- templateFolder : `${ cliConfig . cliFolder } /templates` ,
189
+ template : path . resolve ( `${ cliConfig . cliFolder } /templates/playground.ejs` ) ,
190
+ templateFolder : path . resolve ( `${ cliConfig . cliFolder } /templates` ) ,
190
191
path : '/' ,
191
192
widgetHandler : async ( req ) => {
192
193
const { protocol, host } = merkurConfig . widgetServer ;
0 commit comments