BUG: use tsup-node build grapesjs appear Uncaught Error: Dynamic require of "codemirror/lib/codemirror" is not supported
Question
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
latest version of Chrome
Reproducible demo link
null
Describe the bug
How to reproduce the bug?
- tsup-node src/index.ts --format esm,cjs --legacy-output --watch
What is the expected behavior? I use vite to build grapesjs
What is the current behavior? 1. <img width="1126" alt="image" src="https://github.com/GrapesJS/grapesjs/assets/114127651/26e08b79-17e9-42ca-9133-dae9a32313d4"> 2. <img width="657" alt="image" src="https://github.com/GrapesJS/grapesjs/assets/114127651/a89640e6-a3e6-4c82-84b1-d268d861e2a0"> 3. <img width="1457" alt="image" src="https://github.com/GrapesJS/grapesjs/assets/114127651/ebb4fd65-602b-444f-98e9-d8d02904e8de"> 4. <img width="1317" alt="image" src="https://github.com/GrapesJS/grapesjs/assets/114127651/05b623df-22d7-424e-84ef-35303709c6a2">
If is necessary to execute some code in order to reproduce the bug, paste it here below:
// your code here
Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (1)
I think you have to address that to Vite community, the core is using webpack right now and it works as expected
Related Questions and Answers
Continue research with similar issue discussions.
Issue #6354
BUG: Uncaught TypeError: Cannot set properties of null (setting '_isEditor')
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://grap...
Issue #5742
BUG: Building on Windows 10+
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v122 Reproducible demo link N/A Des...
Issue #5037
FEATURE: How to drag external text into particular index inside the textable component?
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link NA Describe...
Issue #5249
BUG: editor?.Css.addRules(targetCss);
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? latest version of Chrome Reproducible demo...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.