HubSpot / draft-convert

Extensibly serialize & deserialize Draft.js ContentState with HTML.
Apache License 2.0
483 stars 94 forks source link

fix UMD commonjs configuration #151

Open henryqdineen opened 5 years ago

henryqdineen commented 5 years ago

I noticed in our existing UMD bundle the module names won't work in a normal commonjs environment: From https://unpkg.com/draft-convert@2.1.8/dist/draft-convert.js

module.exports = factory(require("Draft"), require("Immutable"), require("React"), require("ReactDOMServer"));

Notice that the module names are innacurate and should be:

module.exports = factory(require("draft-js"), require("immutable"), require("react"), require("react-dom/server"));

I'm assuming that nobody is actually using this UMD bundle except for us and we weren't using it as commonjs so it should be save in a patch release?