Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
None
What browser(s) / client(s) have you tested
Additional environment details
- SPFx version: 1.20.2
- Node.js version: 18.19.1
Describe the bug / error
We are seeing a tenant-specific regression affecting an SPFx library compiled with TypeScript target es5.
The bug presents with the following console error:
TypeError: Class constructor h cannot be invoked without 'new'
And causes the components that use custom extended versions of SPFx HTTP clients fail when they indirectly use MSGraphClientFactory or SPHttpClient.
For example we are implementing a custom class extending SPHttpClient like this:
export class SPHttpClientWithAuth extends SPHttpClient {
constructor(serviceScope) {
super(serviceScope);
}
}
This is compiled as es5 and has been integrating fine with the SPHttpClient runtime code as that was also es5.
Now that the runtime is es6, this class extend is failing.
Recompiling the library with target: es2015 resolves the issue.
We cannot find Microsoft documentation stating that ES5-compiled SPFx components are no longer supported, nor a published 2026 cutoff date for ES5 in SPFx.
Microsoft documentation still presents MSGraphClientV3 and SPHttpClient as supported SPFx APIs.
Steps to reproduce
-
Configure an SPFx webpart with "target": "es5" in the tsconfig.json
-
In the web part src directory, create a class which extends SPHttpClient
export class CustomSPHttpClient extends SPHttpClient {
public static serviceKey = ServiceKey.create<SPHttpClient>("CustomSPHttpClientService", this);
constructor(serviceScope: ServiceScope){
super(serviceScope);
}
protected async _fetch(url: string, configuration: SPHttpClientConfiguration, options: ISPHttpClientOptions): Promise<SPHttpClientResponse> {
console.log("Fetch: ", url);
return await super._fetch(url, configuration, options);
}
}
-
Consume the CustomSPHttpClient service from the webpart.
-
Deploy the web part on a tenant which uses es6 runtime
-
Observe the error: TypeError: Class constructor h cannot be invoked without 'new'
Expected behavior
Please confirm whether Microsoft has recently changed the SharePoint Online/SPFx runtime, @microsoft/sp-http, MSGraphClientFactory, SPHttpClient, or related Graph client dependencies to require ES2015+ output. If this is intentional, please provide the official support/deprecation statement. If not, please treat this as a tenant-specific regression.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
None
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
We are seeing a tenant-specific regression affecting an SPFx library compiled with TypeScript target es5.
The bug presents with the following console error:
TypeError: Class constructor h cannot be invoked without 'new'And causes the components that use custom extended versions of SPFx HTTP clients fail when they indirectly use MSGraphClientFactory or SPHttpClient.
For example we are implementing a custom class extending SPHttpClient like this:
This is compiled as es5 and has been integrating fine with the SPHttpClient runtime code as that was also es5.
Now that the runtime is es6, this class extend is failing.
Recompiling the library with target: es2015 resolves the issue.
We cannot find Microsoft documentation stating that ES5-compiled SPFx components are no longer supported, nor a published 2026 cutoff date for ES5 in SPFx.
Microsoft documentation still presents MSGraphClientV3 and SPHttpClient as supported SPFx APIs.
Steps to reproduce
Configure an SPFx webpart with
"target": "es5"in the tsconfig.jsonIn the web part src directory, create a class which extends SPHttpClient
Consume the CustomSPHttpClient service from the webpart.
Deploy the web part on a tenant which uses es6 runtime
Observe the error:
TypeError: Class constructor h cannot be invoked without 'new'Expected behavior
Please confirm whether Microsoft has recently changed the SharePoint Online/SPFx runtime, @microsoft/sp-http, MSGraphClientFactory, SPHttpClient, or related Graph client dependencies to require ES2015+ output. If this is intentional, please provide the official support/deprecation statement. If not, please treat this as a tenant-specific regression.