Closed Ambroos closed 1 year ago
Thank you for your feedback, I'll fixed this problem soon.
I've just released v0.5.6-beta.0. I hope this resolves the issue you encountered.
Looks good now, thanks for taking this on so fast!
Looks good now, thanks for taking this on so fast!
It's benifit from the accurate information you provide.
Hi!
In my project setup I was temporarily using an older module system that ended up using CommonJS imports in my Vite config. The CommonJS build of this plugin seems to be broken since v0.5.4, because of the addition of this line in compiler.ts:
import.meta
gets replaced by an empty object, which makes theurl
undefined, andcreateRequire
throws.You may be able to fix this with some simple tsup config: https://tsup.egoist.dev/#inject-cjs-and-esm-shims
I worked around it by fixing my TypeScript config so I would not use the cjs import, but I think it's still worth fixing.