-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Bug Report]: ESM build needed #16
Comments
@benwoodward hey mate! There is already an ESM build, please check the README, pal |
Maybe you missed my edit:
|
@benwoodward please follow #17, once it gets merged, a fixed version (2.0.6) will be released. Please reopen this issue if the bug still reproduces. |
Thanks 👍🏻, I'll test it later today. |
Okay, I've done a bunch more testing and created a reproduction issue. I think this is potentially a bug with SvelteKit/Vite. SvelteKit issue: sveltejs/kit#1498 |
Still having issues with this unfortunately.. I've done some more testing locally based on suggestions from Svelte team. What I've found is that importing as an ES module only works with the following added to this repo's "type": "module",
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
}, From testing, I found that it wouldn't work without
There are a couple of other repos with this issue that have fixed the problem by adding Still hard to say whether this is an issue with For the time being I'm going to just copy the |
@benwoodward thanks for your detailed report! I'll see what I can do, and will check how to auto-test this to avoid regressions in the future. In meantime, I'll keep this issue open 👀 |
@benwoodward @devlato following worked for me (v16.13.0). import waitUntilPackage from 'async-wait-until';
const { waitUntil } = waitUntilPackage; I have the type module in
|
I have same issue with version
And remove these 2 lines:
|
or maybe shorter exports:
|
I had the same issue in version
|
Hey folks! This should be fixed in |
Thanks for this package, I've been using it with Svelte, and I'm migrating our codebase to SvelteKit/Vite which uses ES modules. I'm getting the following error when building the project:
Here is an example of how to add ESM output to the package: graffle-js/graffle#193EDIT: Oops just realised that ESM exists, changed my import statement to
import { waitUntil } from 'async-wait-until/dist/es.js';
but still getting an error:EDIT: Renaming the file from
es.js
toes.mjs
seemed to fix this issue for me, let me know what you think and I can make a PREDIT: Perhaps the real issue is that there needs to be a
"module":
value pointing to the esm version inpackage.json
, example: https://github.com/daybrush/moveable/blob/2c4420ed816f6d14ca1cb174c31c5f4f11324eae/package.json#L6The text was updated successfully, but these errors were encountered: