Skip to content

Commit e5e666b

Browse files
committed
Show assets on dev mode
1 parent 967b495 commit e5e666b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,11 @@ aws.initConfig(awsProps)
312312
options.httpRoot = httpRoot;
313313
options.require = function (path) {
314314
if (isDevMode()) {
315+
if (fs.existsSync('static/dist/' + path)) {
316+
return '/dist/' + path;
317+
} else if (fs.existsSync('static/assets/' + path)) {
318+
return '/assets/' + path;
319+
}
315320
//this will break assets in dev mode for now
316321
return '/dist/' + path;
317322
}

0 commit comments

Comments
 (0)