Remove the Node.js server dependence

Hi All!

For sometime we are using TinyMCE in our project dedalo, but we want move to ProseMirror, we saw the code and it’s perfect for the use that we want… thanks for it!. But We are working without Node server, and will be great if the project will can run outside of the Node enviroment, I know that we can packed it, but we are using import modules into Dédalo and we want integrate it with ES6 functionalities. We think that will be great if ProseMirror can run in the modern browsers, and I think that the import function can be compatible in these two scenaries. (Node server and Browsers)

What do you think?


We are no experts in npm,and RollUp, can you explain if exist one option to build the projects with the full ES6 import functionality? (we don’t want use the global namespace for one lib that is designed for modules. We try with the format: ‘iife’ but we don’t like the result)


There is no node dependency. I guess you mean the way the modules are packaged as CommonJS modules. Recent versions also come with an ES6 module (see the "module" field in the package.json files), which might be what you are asking.

1 Like

Hi marjin

Thanks for you answer. Yes, as you say, the modules are packaged as CommonJS but only work in node.js environment and ES version is builded too but only work in node.js environment.

Maybe I was not clear, I mean that the modules are builded in CommonJS and ES formats but are node.js eco-system dependents, the resolution paths are node dependent, the ‘export’ expression is node dependent… We can change it, of course, but every time that we want update prosemirror we will need re-format it. We think that the future will be a real node.js and browser compatibility, full paths, exports in browser format…

In the node.js modules roadmap you can read some things like:

Remove support in the import statement of formats other than ESM:

  • No CommonJS.
  • No JSON.
  • No native modules.

Remove dynamic path searching:

  • No extension adding.
  • No directory resolution, including no support for index.js or index.mjs .
  • No support for main field for ESM.

What do you think?