GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.36k stars 4.05k forks source link

BUG: sourcemap not loading for CompoentTextView #5668

Closed addlistener closed 8 months ago

addlistener commented 8 months ago

GrapesJS version

What browser are you using?

Version 121.0.6167.139 (Official Build) (x86_64)

Reproducible demo link

none.

Describe the bug

How to reproduce the bug?

  1. add customRte and set breakpoints
  2. click step out until it reaches the logic in ComponentTextView

What is the expected behavior? sourcemap loads

What is the current behavior? sourcemap NOT loaded for ComponentTextView, but already loaded for RichTextEditorModule

image image

If is necessary to execute some code in order to reproduce the bug, paste it here below:

<GjsEditor
          className="gjs-custom-editor"
          grapesjs="/grapesjs/dist/grapes.min.js"
          grapesjsCss="/grapesjs/dist/css/grapes.min.css"
/>

using local copy from "npm install grapesjs" because the remote source map does not work for me version copied from the source file: /! grapesjs - 0.21.7 /

Code of Conduct

artf commented 8 months ago

I can only suggest to check properly the source map path

Screenshot 2024-02-12 at 08 45 32

For example, it won't work if you try to load grapesjs via CDN like this https://unpkg.com/grapesjs (here a redirect is happening) as in this case the URL would be https://unpkg.com/grapes.min.js.map. It would work though if try with the full resource URL https://unpkg.com/grapesjs@0.21.8/dist/grapes.min.js, here the final URL would be https://unpkg.com/grapesjs@0.21.8/dist/grapes.min.js.map and it's correct.