Skip to content

Module '@stomp/stompjs' used by is not ESM #739

Description

@BigMichi1

since version 7.3.0 i'm getting this warning in my angular project:

Application bundle generation complete. [13.455 seconds] - 2026-02-25T14:36:12.419Z

▲ [WARNING] Module '@stomp/stompjs' used by 'src/app/log-viewer/services/log-websocket.service.ts' is not ESM

  CommonJS or AMD dependencies can cause optimization bailouts.
  For more information see: https://angular.dev/tools/cli/build#configuring-commonjs-dependencies

just like with older versions i have in my log-websocket.service.ts

import { Client, IMessage } from '@stomp/stompjs';

@Injectable({
  providedIn: 'root',
})
export class LogWebSocketService implements OnDestroy {
  connect(): void {
    if (this.client?.connected) {
      return;
    }

    this.connectionStatusSubject.next(this.reconnectAttempts > 0 ? ConnectionStatus.RECONNECTING : ConnectionStatus.CONNECTING);

    this.client = new Client({
      brokerURL: this.wsUrl,
 ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions