You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to share with my frontend (a TS app that runs in a browser) all my DTO classes developed to my backend, but since they are annotated with the decorator factory @AutoMap() from @automapper/classes I can't do this unless I bundle @automapper/classes with my frontend app, and I'm trying to avoid this since I don't need this package there.
Describe the solution you'd like
Developers can use classes annotated with decorators from @automapper/* in TypeScript apps that are run in the browser. This is done by telling either the TS compiler or a bundler used in the browser app to use the newly added shim file instead of the actual package.
The shim file is a lot smaller in size and does not introduce any dependencies on node packages that would otherwise require even larger polyfills.
Is your feature request related to a problem? Please describe.
I want to share with my frontend (a TS app that runs in a browser) all my DTO classes developed to my backend, but since they are annotated with the decorator factory
@AutoMap()
from@automapper/classes
I can't do this unless I bundle@automapper/classes
with my frontend app, and I'm trying to avoid this since I don't need this package there.Describe the solution you'd like
Developers can use classes annotated with decorators from
@automapper/*
in TypeScript apps that are run in the browser. This is done by telling either the TS compiler or a bundler used in the browser app to use the newly added shim file instead of the actual package.The shim file is a lot smaller in size and does not introduce any dependencies on node packages that would otherwise require even larger polyfills.
An example of this kind of file: https://github.com/nestjs/graphql/pull/1184/files for
@nestjs/graphql
package. Another one: https://github.com/nestjs/swagger/pull/1505/files (with a test suite!)The shim file can live under
@automapper/classes/extra
directory, and it will only exportsAutoMap
function I guess.Describe alternatives you've considered
Create the shim file locally
Additional context
No response
The text was updated successfully, but these errors were encountered: