Skip to content

payload generate:importmap Fails with Custom Lexical Editor Feature #10011

Closed Answered by jmikrut
Tanish2002 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @Tanish2002 I can shine some light on this. You are importing a CSS file in server-only code, which is crashing the generate:importmap command (because that is a Node command and doesn't know how to parse CSS).

This is why all of our CSS for Lexical features is abstracted out of the server-side files and is present only in the files meant to be consumed solely in a browser context. Browser code goes through Turbopack / Webpack, but the config itself (and the server-side part of Lexical components) is Node-only, so there, CSS will break the process.

If you have a barrel file, or a single file that imports / exports many things (including a CSS file), this would crash the Node scripts t…

Replies: 11 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Tanish2002
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@revnelson
Comment options

@rilrom
Comment options

@revnelson
Comment options

@rilrom
Comment options

@revnelson
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
status: needs-triage Possible bug which hasn't been reproduced yet
5 participants
Converted from issue

This discussion was converted from issue #9992 on December 17, 2024 01:29.