Widgets are compiled before modules are loaded, leading to compile error
At compile time, in the tiddlyclip plugin, js user functions are load dynamically with a filter, this is broken in 5.4.0.
I have produced a minimum test case at https://startup540err.tiddlyhost.com/
and see this on the console:
Error executing boot module $:/bj/modules/widgets/broken.js: TypeError: can't access property "measure", $tw.perf is undefined
anonymous/</exports.compileFilter@$:/core/modules/filters.js:378:19
anonymous/</exports.filterTiddlers@$:/core/modules/filters.js:236:16
anonymous/</<@$:/bj/modules/widgets/broken.js:31:19
The same works with 5.3.8 - see https://startup38working.tiddlyhost.com/
I think this is caused by moving `
var widget = require("$:/core/modules/widgets/widget.js");`
into `$:/core/modules/startup/load-modules.js`
1 条评论