mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
fix: allow dynamic import to work when meteor is running with a path
When setting "useLocationOrigin: true" and also using a root url like ROOT_URL=http://host:port/mypath , dynamic-import will ignore "mypath" when fetching for files to be imported, resulting in a 404 for these files. To bypass this problem, i changed the code to prepend the "mypath" to the module's URL, before trying to fetch it. Related to #11105.
This commit is contained in:
@@ -151,7 +151,7 @@ function fetchMissing(missingTree) {
|
||||
var disableLocationOriginIframe = dynamicImportSettings.disableLocationOriginIframe;
|
||||
|
||||
if (useLocationOrigin && location && !(disableLocationOriginIframe && inIframe())) {
|
||||
url = location.origin.concat(url);
|
||||
url = location.origin.concat(__meteor_runtime_config__.ROOT_URL_PATH_PREFIX, url);
|
||||
} else {
|
||||
url = Meteor.absoluteUrl(url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user