for (const name in resources.runtimeAssets) {
const asset = resources.runtimeAssets[name] as AssetEntry;
asset.name = name;
- asset.resolvedUrl = `_framework/${name}`;
+ asset.resolvedUrl = loaderHelpers.locateFile(name);
assets.push(asset);
}
for (const name in resources.assembly) {
const asset: AssetEntry = {
name,
- resolvedUrl: `_framework/${name}`,
+ resolvedUrl: loaderHelpers.locateFile(name),
hash: resources.assembly[name],
behavior: "assembly",
};
for (const name in resources.pdb) {
const asset: AssetEntry = {
name,
- resolvedUrl: `_framework/${name}`,
+ resolvedUrl: loaderHelpers.locateFile(name),
hash: resources.pdb[name],
behavior: "pdb",
};
continue;
}
- const resolvedUrl = name.endsWith(".js") ? `./${name}` : `_framework/${name}`;
+ const resolvedUrl = loaderHelpers.locateFile(name);
const asset: AssetEntry = {
name,
resolvedUrl,
if (config === "appsettings.json" || config === `appsettings.${applicationEnvironment}.json`) {
assets.push({
name: config,
- resolvedUrl: config,
+ resolvedUrl: (document ? document.baseURI : "/") + config,
behavior: "vfs",
});
}
export interface ResourceRequest {
name: string, // the name of the asset, including extension.
behavior: AssetBehaviours, // determines how the asset will be handled once loaded
- resolvedUrl?: string;
+ resolvedUrl?: string; // this should be absolute url to the asset
hash?: string;
}