From 55eb5f6d46ef19ed0f1458aa2dbb0fd2028d136a Mon Sep 17 00:00:00 2001 From: Campbell Morgan Date: Thu, 7 Oct 2021 17:55:24 +0100 Subject: [PATCH] Add `browser` field to package.json for frontend use * 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 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 2f0d7e337..b5d8aacf6 100644 --- a/package.json +++ b/package.json @@ -98,6 +98,7 @@ ] }, "main": "./dist/index.js", + "browser": "./dist/browser-shim.js", "types": "./dist/index.d.ts", "readmeFilename": "README.md", "description": "Create GraphQL schema and resolvers with TypeScript, using classes and decorators!",