Fix Webpack import.meta error
This PR:
- Fixes this error I kept getting with Webpack by changing the function to use just the
import.meta.urlrather thanimport.meta
Critical dependency: Accessing import.meta directly is unsupported (only property access is supported)
Hey!
I'm curious why you compile a server library with webpack? If you really can't avoid that, would making webpack resolve mongoose-zod to dist/index.cjs make the compilation possible (since the CJS version of the lib is not using import.meta)?
Hey! I'm curious why you compile a server library with webpack? If you really can't avoid that, would making webpack resolve
mongoose-zodtodist/index.cjsmake the compilation possible (since the CJS version of the lib is not usingimport.meta)?
I'll look into that. I was attempting to use this library within my NextJS project and by default this is the error that you get without configuring anything. I believe NextJS compiles with CommonJS.