Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop ES build? #123

Closed
TehShrike opened this issue Oct 18, 2018 · 2 comments
Closed

Drop ES build? #123

TehShrike opened this issue Oct 18, 2018 · 2 comments

Comments

@TehShrike
Copy link
Owner

TehShrike commented Oct 18, 2018

The ES build is confusing TypeScript/TypeScript users, and Webpack hasn't shown any interest in fixing its massive bug.

Should we just drop the ES build and tell ESM users to do

import * as merge from 'deepmerge'

?

@sorenhoyer
Copy link

@TehShrike To me dropping the ES build seems like a like a rather step in the wrong direction, which is a bit uncommon for a new major version.
I don't think "it will be confusing to TypeScript users" to set esModuleInterop: true and import merge from 'deepmerge' - that's pretty normal, as is compiling both CJS and ES module versions.

In my company we compile all our packages kinda like https://github.com/bitjson/typescript-starter is doing it. Using the TSC to output CJS (main) and ES (module) versions. And in the application build process, we use webpack to bundle things together (remember to set mainfields to give priority to module over main). Kinda like create-react-app is doing. With it comes a lot of benefits.

We've never faced any issues and we prefer ES modules, so right now we're stuck with v2, because of this decision. Hope you'll change your mind. :-)

@TehShrike
Copy link
Owner Author

It is a step backwards, but as long as Webpack doesn't fix the bug, we get a steady stream of Webpack and/or TypeScript users who run into the bug, and then come and create an issue or comment here on this project.

If everyone would go and comment on the Webpack bug, I would keep the ES build. But they come and comment here, and so it's not worth it for me to take the "correct" stance and publish the ES build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants