RangeError: Adding different instances of a keyed plugin (plugin$)

In case someone is interested in the outcome of this specific issue. For my dev environment I managed to resolve it through configuring vitejs appropriately (I think).

  1. install prosemirror-model, prosemirror-state, prosemirror-view and prosemirror-transform
  2. make the following change in vite.config.js
optimizeDeps: {
    include: [
      'prosemirror-state',
      'prosemirror-transform',
      'prosemirror-model',
      'prosemirror-view'
    ]
  }

The result of this are 4 separate chunks that will be loaded, which as a result makes the problem go away.

1 Like