If I do something like this:
import cssContents from "./file.css" with { type: "text" };
I expect cssContents to be the the string representation of the contents of file.css. Instead I get:
ERROR: [plugin: deno-loader] [unreachable] Not an ESM module.
I have tried debugging to see what actually causes this message but I find debugging within the deno module cache to be very confusing.
Interestingly, what I’m actually trying to do is the following:
import moduleDts from "./module.d.ts" with { type: "text" };
(yes, I am trying to load a .d.ts file as text, don’t ask me why…)
Which yields a slightly different error:
ERROR: [plugin: deno-loader] The import attribute type of "text" is unsupported.
Any idea what’s going on?
If I do something like this:
I expect
cssContentsto be the the string representation of the contents offile.css. Instead I get:I have tried debugging to see what actually causes this message but I find debugging within the deno module cache to be very confusing.
Interestingly, what I’m actually trying to do is the following:
(yes, I am trying to load a .d.ts file as text, don’t ask me why…)
Which yields a slightly different error:
Any idea what’s going on?