mdx-editor / editor

A rich text editor React component for markdown
https://mdxeditor.dev
MIT License
1.75k stars 139 forks source link

[BUG] When doing a production build I got Lexical error #555

Closed denisvely closed 1 month ago

denisvely commented 1 month ago

Describe the bug I got an error: Lexical.prod.mjs:9 Uncaught SyntaxError: Invalid regular expression: /^[^A-Za-z�-��-��-??-??-???-??-??-?]*[?-??-??-?]/: Range out of order in character class (at Lexical.prod.mjs:9:1073) at new RegExp () at ./modules/Wysiwyg/index.js (Lexical.prod.mjs:9:1073) at webpack_require (bootstrap:19:1) at ./modules/Rows/SingleRow.js (UploadedDocumentRow.js:55:41) at webpack_require (bootstrap:19:1) at ./modules/Rows/index.js (SingleRow.js:126:25) at webpack_require (bootstrap:19:1) at ./common/CustomFields/index.js (CustomFields.js:152:16) at webpack_require (bootstrap:19:1) at ./pages/Contacts/index.js (serviceFormDataReshaper.js:83:2)

when building a production with webpack.

As I understood lexical is dependency for mdx-editor/editor. Do you have any suggestions how to fix it?

Reproduction Unfortunately can't provide anything at all. Just looking for an advice.

Expected behavior Building a project without an error.

Desktop (please complete the following information):

Note: It's working on 2.20.0

petyosi commented 1 month ago

Sorry, no idea without a reproduction. Maybe something in Lexical not happy with your bundler.