Read file as text in JSR package (easy with NPM, not Deno)
I'm writing a JSR package. My problem boils down to; I want to read a file (that is part of the package) as text, within a script (also part of the same package). I can get this to work fine if I use NPM to install this JSR package, but in Deno it does not work; the
import.meta.url inside the script that needs to read the text file resolves to a https://jsr.io/… URL, whereas the text file is presumably ready to be read on the user's machine given the package has been installed. How do I read the text file? Since it is a JSR package, I cannot rely on the CWD.