Skip to content

Commit

Permalink
fix: FRAMEWORK_STATIC_ASSETS_PATH not being used in server path code
Browse files Browse the repository at this point in the history
  • Loading branch information
Monar committed Nov 19, 2019
1 parent 5e91115 commit d221804
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion fusion-cli/entries/server-public-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,19 @@ if (typeof cdnUrl === 'string') {
assert(new URL(cdnUrl), 'CDN_URL must be valid absolute URL');
}

let assetBasePath = '/_static/';
let assetsPath = load('FRAMEWORK_STATIC_ASSET_PATH');
if (typeof assetsPath === 'string') {
assert(
!assetsPath.endsWith('/'),
'FRAMEWORK_STATIC_ASSET_PATH must not end with /'
);
assert(
assetsPath.startsWith('/'),
'FRAMEWORK_STATIC_ASSET_PATH must start with /'
);
}

let assetBasePath = assetsPath ? assetsPath + '/' : '/_static/';

if (prefix) {
assetBasePath = prefix + assetBasePath;
Expand Down

0 comments on commit d221804

Please sign in to comment.