-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Add support for ESM modules #105
base: master
Are you sure you want to change the base?
Conversation
This generates ESM module syntax ("export default") in a separate esm/ directory. For simplicity, it assumes that if you want to use ESM modules, you also have ES6 features in your environment, so the build script turns that on as well. The esm index.js is exposed through the "module" field in package.json.
Would love to see some discussion/progress on this. |
The pkg size is starting to be questionable. Why should we need so many different versions and duplicate the code? I'm not only looking for a fast deep-equal but also for a small footprint with faster download, faster CI pipeline and reduced number of files js performences isn't everything. Many are already using ESM, it requires no bundler and can be directly imported from both Deno and browsers - and also nodes new http loader - so no NPM is needed. Think u should:
|
Hey there 👋 Just wanted to bring up that the lack of esm support seems to be causing some downstream issues in libraries with the rise of build tools like Vite that are esm-only. I'm not sure if there is a workaround, but having esm output would help a lot here. |
Gentle ping? |
This is a small library, so it's easy to inline the function. I made a esm version of the library @ctx-core/fast-deep-equal as well that suits my own needs, which are underscore case. |
* ADD error on bailout * REPLACE fast-deep-equal because of epoberezkin/fast-deep-equal#105 * REPLACE object-path * UPDATE event-reduce
@epoberezkin Any updates here? |
courtesy -> epoberezkin#105
2 years gone. and problem still persist so sad |
I ended up forking this library to provide ESM support. |
courtesy -> epoberezkin#105
would the maintainers take a different PR? |
any news on 2024 or we will wait to 2025? |
Hey! Storybook uses this package as a dependency, and I noticed that it doesn't expose ESM modules - but it's quite easy to add support for. What do you think about this PR?
This generates ESM module syntax ("export default")
in a separate esm/ directory.
For simplicity, it assumes that if you want to use
ESM modules, you also have ES6 features in your
environment, so the build script turns that on as well.
The esm index.js is exposed through the "module" field
in package.json.