How can I use functions like normalizePath() in a script?
Oneechan69 opened this issue · 2 comments
Oneechan69 commented
To use normalizePath()
in a plugin, you need to import it with import { normalizePath } from 'obsidian';
. That doesn't work in a script (or at least an invocable one. I looked at but I couldn't figure out how else to add it.
dleeftink commented
mnaoumov commented
The easiest is to use customJS.obsidian.normalizePath()
More difficult but more powerful way is to use https://github.com/mnaoumov/obsidian-fix-require-modules/