Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Commit

Permalink
Bug fix #78: GoError: The moduleSpecifier "./libs/shim/urijs.js" cou…
Browse files Browse the repository at this point in the history
…ldn't be found on local disk.

Added a alternate path when the setting "separate" is used.
  • Loading branch information
Tim committed Mar 4, 2021
1 parent eb282af commit 55b9687
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ bower_components/*
/libpeerconnection.log

testem.log
.idea
7 changes: 6 additions & 1 deletion lib/generate/Request/analyze.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,15 @@ function analyze(request, result, block) {

function address(address, feature, result) {
const addressText = address.toString();
let urijsPath = './libs/shim/urijs.js';
if (aid.variableStart.test(addressText)) {
// Runtime scheme processing necessary
feature.address = new URI(addressText);
result.effectImports.add('./libs/shim/urijs.js');
// Handle urijs import for separate option
if(result.setting && result.setting.separate && result.setting.separate === true) {
urijsPath = '../../libs/shim/urijs.js';
}
result.effectImports.add(urijsPath);
} else if (aid.schemeStart.test(addressText)) {
// Scheme specified
feature.address = new URI(addressText);
Expand Down

0 comments on commit 55b9687

Please sign in to comment.