chanzuckerberg / czi-prosemirror

Rich Text Editor built with React and ProseMirror
MIT License
346 stars 62 forks source link

remove dynamic import of mathquill #62

Closed dcwither closed 5 years ago

dcwither commented 5 years ago

This accomplishes two things -

  1. we now have a much more standard package that doesn't require special support
  2. fixes issues I was having importing this package with webpack 4 - which should create more optimizations than we can expect from this

If we want this benefit again, we should do something like a dependency injection, where something else can wrap the component in react loadable (or whatever it wants) to pass it in to the component that uses it.

Looks like this is already built into Editor.js where you can remove MathNodeView from the default views, and add an async component in its place.