We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b29c6f9 commit afdb63bCopy full SHA for afdb63b
src/api/API.ts
@@ -38,7 +38,13 @@ export class API {
38
* @param path the vault relative path of the file to import
39
*/
40
public async importJs(path: string): Promise<any> {
41
- const fullPath = this.app.vault.adapter.getResourcePath(path);
+ let fullPath = this.app.vault.adapter.getResourcePath(path);
42
+ if (!fullPath.includes('?')) {
43
+ const scriptFile = this.app.metadataCache.getFirstLinkpathDest(path, "")
44
+ if (scriptFile) {
45
+ fullPath += '?' + scriptFile.stat.mtime
46
+ }
47
48
return import(fullPath);
49
}
50
0 commit comments