Skip to content

Typescript TS1005,TS1109 error with the @module-federation/bridge-react's createLazyComponent #4278

@mitul013

Description

@mitul013

Describe the bug

Describe the bug
I am getting typescript error (TS1005) while using @module-federation/bridge-react.

Error:
ERROR in node_modules/@module-federation/bridge-react/dist/index.d.ts 270:155-156

Image

[tsl] ERROR innode_modules/@module-federation/bridge-react/dist/index.d.ts(270,156)
TS1005: '(' expected.

ERROR in /node_modules/@module-federation/bridge-react/dist/index.d.ts 270:156-157
[tsl] ERROR in /node_modules/@module-federation/bridge-react/dist/index.d.ts(270,157)
TS1109: Expression expected.

Node: v22.14
Typescript: v5
webpack: v5

Screenshot attached.

Reproduction

Use @module-federation/bridge-react' with strict type check tsconfig or with ts-loader with default options

Used Package Manager

yarn

System Info

OS: macOS 15.6.1
    CPU: (8) arm64 Apple M3
    Memory: 90.64 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v22.14.0/bin/yarn
    npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm
  Browsers:
    Chrome: 143.0.7499.147
    Safari: 18.6

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions