Skip to content

fix: load typeorm-aurora-data-api-driver correctly when using webpack - #5302

Merged
pleerock merged 1 commit into
typeorm:masterfrom
coyoteecd:fix-aurora-data-api-driver-load
Jan 22, 2020
Merged

pleerock merged 1 commit into
typeorm:masterfrom
coyoteecd:fix-aurora-data-api-driver-load

Conversation

@coyoteecd

Copy link
Copy Markdown
Contributor

TypeORM uses require() within PlatformTools to load driver packages.
The typeorm-aurora-data-api-driver is exported with export default and packaged with rollup, which, as per webpack/webpack#4742,
causes the require'd module to be available via require('typeorm-aurora-data-api-driver').default property.

Fixes #4788

…typeorm#4788)

TypeORM uses require() within PlatformTools to load driver packages.
The typeorm-aurora-data-api-driver is exported with export default and packaged with rollup, which, as per webpack/webpack#4742,
causes the require'd module to be available via require('typeorm-aurora-data-api-driver').default property.
@Can-Sahin

Copy link
Copy Markdown

This is my error case too. Hope the pull request merges soon

@coyoteecd

Copy link
Copy Markdown
Contributor Author

@pleerock This change is effectively a one-liner, mind having a look and merging this for the next release?

@pleerock
pleerock merged commit 9da0d34 into typeorm:master Jan 22, 2020
@pleerock

Copy link
Copy Markdown
Member

thanks!

@coyoteecd
coyoteecd deleted the fix-aurora-data-api-driver-load branch January 22, 2020 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Serverless framework + webpack

3 participants