-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing EntityManager fails when using webpack #57
Comments
Feel free to PR this, this particular piece of code also came from someone else, I don't really like that enum there anyway. |
Will you have time for this during today? I'd like to ship v5 in few hours, will be happy to look into it myself right now, if you haven't started already. |
I can have it done today for sure |
Already started, so will push what I have in a minute and feel free to improve on that :] |
Oh sorry I missed that message. Feel free to look at the pull request. |
I see we ended up with quite similar approach, mine being a less verbose I guess. |
Describe the bug
I've got an issue with webpack not being able to dynamically import '@mikro-orm/knex' or '@mikro-orm/mongodb' in the
whenModuleAvailable
function. Since these are imported as enums (e.g.import(EntityManagerModuleName.Knex)
) webpack does not bundle these modules. It's possible to fix this by importing with stringsimport("@mikro-orm/knex")
. I can write a pull request if this would help :)Versions
The text was updated successfully, but these errors were encountered: