Skip to content

:global not working with turbopack in next.js 16 #5

@rsallar

Description

@rsallar

Hi, It seems next.js turbopack (defaults in v16) does not support :local and :global pseudo classes.

The error is

'global' is not recognized as a valid pseudo-class. Did you mean '::global' (pseudo-element) or is this a typo?

Import trace:
  Client Component Browser:
    ./node_modules/@svar-ui/react-gantt/dist-full/index.css [Client Component Browser]

Official documentation: https://nextjs.org/docs/app/api-reference/turbopack#unsupported-and-unplanned-features
Nextjs issue: parcel-bundler/lightningcss#6
LighteningCss issue: parcel-bundler/lightningcss#6

Is there any option to have this working with turbopack?

Workaround is to revert to webpack. E.g npm run dev --webpack

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