-
Notifications
You must be signed in to change notification settings - Fork 9
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
Dependencies on node APIs #1126
Comments
What is the issue you face? Because bundling those polyfills does not make much sense. |
Actually none of the other nextcloud packages (at least the ones I used) depend on node polyfills, which allowed me to get rid of |
Also noteworthy: |
Hmm, the docs of EDIT: I guess this was old documentation. We can still import from |
I am still not really convinced this makes sense, as the libraries are build for bundlers and thus you can simply use polyfills there. But especially because there are also some other dependencies that use node modules, and therefor if we bundle the polyfills you have to polyfill the dependencies by your self and thus get the same polyfill injected twice. Meaning for this library if we include the path polyfills you still need the polyfills in your app config because this library depends on e.g. Directly importing from So I would prefer if we can agree on a common practice across |
Gotcha, didn't know we use it in files too.
Yeah this makes total sense. From my side, the reasons I think we should move away from node polyfilling:
Need input from more people on this. @skjnldsv any comments? BTW the webdav client used to depend on node polyfills earlier, but that dependency too is gone in the latest version (they split node and browser modules). |
Always up for cleaner approaches. Thought what library do you have in mind for the few path imports we're using (usually |
|
Then how about https://www.npmjs.com/package/@nextcloud/paths ? |
Can we please not depend on
path
? I would really like to get rid of node polyfills.The text was updated successfully, but these errors were encountered: