I consider using prose mirror for a project. However, I would like to avoid a build step for now and use ES Modules – is that possible, or is the script tag the only way for using Prosemirror directly in my browser?
There were some older posts on this around 2018, 2019 and an issue on github ( ESM compatibility #863) that said that at the point of writing, Node did not support ES Modules, which, if I understand correctly, changed in the meantime.
Browsers cannot resolve imports like
from "prosemirror-view", only URL paths, so you’ll need some kind of service to translate those before you can run the library in the browser directly. My esmoduleserve can do that, and I’m sure there are more polished alternatives as well.
Thanks! I would not mind direct imports from URL paths, but I understand that setting this up might not be demanded or is difficult. I’ll give it a try with esmoduleserve or the modernweb dev server.