Skip to content

Culori ESM import throws an error in Next.js production build #195

@VojtechVidra

Description

@VojtechVidra

Hi Dan Burzo!

I've encountered strange issue when using latest culori with Next.js in production build only. I've created minimal reproduction of the issue (see the repo below).

How to reproduce

Dev

If you run the app with npm run dev command it works as expected, the converter converts the color with no problem in both the culori and culori/require usage.

Prod

However if you run the production build npm run build && npm run start the culori ESM version throws an error but the culori/require version still works as expected.

https://github.com/VojtechVidra/nextjs-culori

I'm not sure if this is an issue with Culori or Next.js, but I've figured I'll ask you first.

Thanks for creating this great package!

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions