Use case or problem
Obsidian API has some useful functions that seems to be able to use only within plugins using const obsidian = require('obsidian');
.
Sometimes those functions are needed to use ad-hoc, from Developer Tools
, dataviewjs
, Templater
etc, but at this stage I see no way to reach those functions and require('obsidian')
gives Uncaught Error: Cannot find module 'obsidian'
;
Proposed solution
add a global variable such as window.app.module
to be able to reach the module outside plugins.