Check me here... I can't use require() if I'm in a JS module (ReferenceError) but I can't use import if I'm *not* in a module (SyntaxError)

How am I supposed to reliably load something if this file needs to be used in both contexts??? Losing my marbles

@tekknolagi in vanilla node at least, you should be able to use dynamic import() syntax in a commonjs module IIRC. just not the static “import xyz from ‘foo’” syntax.