Skip to content

Commit

Permalink
fix: check for empty publicPath
Browse files Browse the repository at this point in the history
  • Loading branch information
liximomo committed May 18, 2020
1 parent 2ccc3ef commit 03dfac3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/shuvi/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ export class Api implements IApi {

get assetPublicPath(): string {
let prefix =
this.mode === 'development' ? PUBLIC_PATH : this.config.publicPath;
this.mode === 'development'
? PUBLIC_PATH
: this.config.publicPath || PUBLIC_PATH;

if (!prefix.endsWith('/')) {
prefix += '/';
Expand Down

0 comments on commit 03dfac3

Please sign in to comment.