Issues with loading from ESM, "type": "module", & rollup
btakita opened this issue · 2 comments
btakita commented
I ran across an issue with loading this library from an ESM & have since vendorized it with a forked repo & custom build to fix the problem. I'm creating this issue to track the changes. I'll investigate if there is any problem with this package of if it's a problem with a dependency.
builtins
is a dependency with a loading issue from ESM. juliangruber/builtins#37
Please keep this issue open until I can provide more detail. Thank you.
wooorm commented
What is the problem? The error you ran into?
I’m guessing you have a problem with Vite and Rollup?
If so: report it there. CJS dependencies are fine in Node ESM!
btakita commented
I'm able to use:
import * from imr from 'import-meta-resolve'
const { resolve } = imr
so it works as expected, but it's not as convenient for ESM users as CJS users.