diff --git a/packages/pwa-kit-extension-sdk/src/configs/webpack/overrides-resolver-loader.ts b/packages/pwa-kit-extension-sdk/src/configs/webpack/overrides-resolver-loader.ts index 08f0ce5fc7..078445bc4d 100644 --- a/packages/pwa-kit-extension-sdk/src/configs/webpack/overrides-resolver-loader.ts +++ b/packages/pwa-kit-extension-sdk/src/configs/webpack/overrides-resolver-loader.ts @@ -66,8 +66,8 @@ const OverrideResolverLoader = function (this: LoaderContext) { } // Lets use the compiler configuration to ensure we are resolving the correct file extensions. - const compilerOptions = this._compiler!.options - const extensions = compilerOptions.resolve?.extensions || [] + const compilerOptions = this._compiler?.options + const extensions = compilerOptions?.resolve?.extensions || [] const basedir = options?.baseDir || process.cwd() const applicationExtensions = compiler?.custom?.extensions || []