-
-
Notifications
You must be signed in to change notification settings - Fork 677
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
Add browser
field to package.json for frontend use
#1065
Conversation
* The `browser-shim` works nicely when trying to share code between frontend and backend, however manual overrides can be tricky * Many build systems (including webpack) will take the script from the `browser` field simplifying this process
Any updates here @MichalLytek? I know its a small change, but it would help me fixing this in many projects and for the future. |
I'm not convinced about this. TypeGraphQL can also normally work on frontend (e.g. https://github.com/MichalLytek/type-graphql/tree/master/examples/apollo-client). And looks like with this change, bundlers will start using shim instead of the real package 😕 |
It does not work on framework like SvelteKit for frontend (but it does work for backend). |
This PR fixed the problem in SvelteKit ! |
a190360
to
f50d1d0
Compare
6e1c81e
to
c8d2e2d
Compare
@campbellwmorgan |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1065 +/- ##
=======================================
Coverage 95.50% 95.50%
=======================================
Files 113 113
Lines 1847 1847
Branches 364 326 -38
=======================================
Hits 1764 1764
Misses 83 83 ☔ View full report in Codecov by Sentry. |
browser-shim
works nicely when trying to share code betweenfrontend and backend, however manual overrides can be tricky
the
browser
field simplifying this process