-
-
Notifications
You must be signed in to change notification settings - Fork 641
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
Circular dependency #310
Comments
Cyclic dependencies are supported by ES6 and rollup. https://github.com/rollup/rollup/wiki/Cycles. |
I have read these docs, but that is no help. I always get Rollup warnings during build and eventually my final bundle fails to run. I had to fork Dexie and fix cyclic deps to make it work for me. I think it's worth mentioning that I use 'iife' as a rollup output format, so I have no any modules as a result. |
Dexie's build script uses rollup to output UMD format (IIFE, AMD, CJS combined) and it works perfectly. Which version of rollup are you using? |
I am using 0.34.13. |
Ok, then it's more up-to-date than mine. Thanks for the response. I used to publish a rolled-up ES6 module at dist/dexie.es6.js but moved it away for some reason. The build script creates it though using rollup of src/Dexie.js. Maybe I should put it back again and start pointing jsnext:main to that version instead. Keeping this issue open as a reminder. |
Would be really great to have it back. Thank you. |
I've put Please try:
... and report me back if it works for you. |
Thank you. Will try and respond. |
It works. Tried with 1.4.3-rc. |
Good. The reason I get it working is because I've been using an older version of rollup. Cyclic dependencie are broken in the newest version of rollup, see: rollup/rollup#995 |
Got it. Thanks. |
I am using rollup.js in my build flow and it constantly fails to process Dexie due to circular dependecies in errors.js and Promise.js. They both seems to import utils and are imported by it.
I think we can get rid of these deps in utils.js and use plain Promise and hardcoded error definition.
The text was updated successfully, but these errors were encountered: