Skip to content

DOCUMENT import from @angular/core breaks build on Angular 19+ #2253

@n74085889-rgb

Description

@n74085889-rgb

Hi,

I've noticed that in the current version of @swimlane/ngx-datatable (22.0.0), the library imports DOCUMENT from @angular/core.
However, in Angular 16+ (including Angular 19), DOCUMENT has been moved to @angular/common. As a result, using ngx-datatable in a project with Angular 19 and Nx (with esbuild) fails the build with:

No matching export in "@angular/core" for import "DOCUMENT"

It seems that on StackBlitz the build passes because their Vite/esbuild setup tolerates this import, but in strict local builds it fails.

Would it be possible to update the import to:

import { DOCUMENT } from '@angular/common';

or provide a fix so the library is fully compatible with Angular 16+?

Thanks in advance for looking into this!

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