From ed11e6ca73d2a4e4762e57837ea63de9609588cc Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Thu, 14 Oct 2021 14:50:42 -0400 Subject: [PATCH] fix(web): turn off fully specified option in webpack so packages like graphql@14 will not break build --- packages/web/src/utils/config.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/web/src/utils/config.ts b/packages/web/src/utils/config.ts index 775ea37e37..30f4e8ef2e 100644 --- a/packages/web/src/utils/config.ts +++ b/packages/web/src/utils/config.ts @@ -58,6 +58,16 @@ export function getBaseWebpackPartial( // Enabled for performance unsafeCache: true, rules: [ + { + // There's an issue resolving paths without fully specified extensions + // See: https://github.com/graphql/graphql-js/issues/2721 + // TODO(jack): Add a flag to turn this option on like Next.js does via experimental flag. + // See: https://github.com/vercel/next.js/pull/29880 + test: /\.m?jsx?$/, + resolve: { + fullySpecified: false, + }, + }, { test: /\.([jt])sx?$/, loader: join(__dirname, 'web-babel-loader'),