You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use the base property in .dojorc to change the base path to, for example, "/admin/" instead of "/", the generated index.html will be changed properly to reflect that. However, webfont references to locally hosted web fonts (in assets directory) are not changed - they stay at "/assets/". At runtime, the browser will reference /assets/xxx.woff instead of /admin/assets/xx.woff and will not find the webfont. Interestingly, when hosted by the dojo --serve --watch mechanism, this works. When using a production build and moving the content of the list directory to an http server, it doesn't - 404 not finding the resource. All css and js resources are resolved properly.
To be honest I am not entirely why this doesnt work. Creating this issue as discussed in Discord.
Bug
When you use the base property in .dojorc to change the base path to, for example, "/admin/" instead of "/", the generated index.html will be changed properly to reflect that. However, webfont references to locally hosted web fonts (in assets directory) are not changed - they stay at "/assets/". At runtime, the browser will reference /assets/xxx.woff instead of /admin/assets/xx.woff and will not find the webfont. Interestingly, when hosted by the dojo --serve --watch mechanism, this works. When using a production build and moving the content of the list directory to an http server, it doesn't - 404 not finding the resource. All css and js resources are resolved properly.
To be honest I am not entirely why this doesnt work. Creating this issue as discussed in Discord.
Package Version: 7.0.0
Code
hello-world-webfont.zip
Sample based on the default hello world app, with only minimum modifications:
Expected behavior:
Webfont should be loaded.
Actual behavior:
Webfont is not loaded because the browser tries to load the font from /assets instead of /admin/assets
The text was updated successfully, but these errors were encountered: