Canvas.script entries do not respect an "import map"
https://github.com/GrapesJS/grapesjs/issues/5353#issuecomment-1704023749
Read full answer below ↓Question
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Version 1.56.20 Chromium: 115.0.5790.171 (Offizieller Build) (arm64)Reproducible demo link noneDescribe the bug scripts referenced by canvas.scripts can not import third-party modules based on an "import map". if the same module has to be used both by editor, preview and HTML export it may require the preparation of two different script versions - one for development (within GrapesJS) and another one for deployment - which should definitely be avoidedCode of Conduct[X] I agree to follow this project...
Answers (4)
have you tested them? when trying in the current version of GrapesJS, I get the following (expanded) error message in the browser log:
trying to use a data URI instead of a file reference failed as well
The issue you're encountering stems from the isolated nature of the GrapesJS canvas, which is typically rendered within an <iframe>. Import maps, defined using <script type="importmap">, are scoped to the document they are declared in. When GrapesJS loads scripts via canvas.scripts, these scripts a...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5353
Canvas.script entries can not be JS modules
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Version 1.56.20 Chromium: 115.0.5790.171 (Of...
Issue #5352
Uncaught SyntaxError: Unexpected token '{' at CanvasView.ts:590:12
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 1.56.20 Chromium: 115.0.5790.171 (...
Issue #5363
Cannot "sort" elements of layer panel
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Version 1.56.20 Chromium: 115.0.5790.171 (Of...
Issue #5362
Draggable/droppable property functions not called while dragging
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 1.56.20 Chromium: 115.0.5790.171 (...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Tutorial
UnStudio for GrapesJS: 4 Plugins to Build Better Visual Editors
Meet UnStudio, a new GrapesJS plugin studio with four tools, safer and better editor: Command Palette, Responsive Pack, Autosave & Restore, and Autofill
Tutorial
Claude Skill for GrapesJS: How AI Is Changing the Way We Build Visual Editors
We've released the Claude Skill for GrapesJS Development — a free, open-source skill that turns Claude into a developer who actually knows GrapesJS
Tutorial
Vanilla GrapesJS vs GrapesJS With Plugins: What You Actually Get Out of the Box (2026)
New to GrapesJS? See exactly what the stock editor gives you, where it falls short, and which plugins close the gaps — a beginner-friendly 2026 comparison
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.