appwrite / sdk-for-web

[READ-ONLY] Official Appwrite Web SDK ๐Ÿงก
https://appwrite.io
BSD 3-Clause "New" or "Revised" License
273 stars 59 forks source link

๐Ÿ› Bug Report: CommonJS or AMD dependencies can cause optimization bailouts #34

Closed pauli2406 closed 3 weeks ago

pauli2406 commented 1 year ago

๐Ÿ‘Ÿ Reproduction steps

Add the Appwrite web SDK to an angular project. Run the build command to compile.

npx nx run oncampus-cms:build --parallel

Should also occur when execute it with ng serve

๐Ÿ‘ Expected behavior

No warnings regarding "CommonJS or AMD dependencies can cause optimization bailouts" should appear while compiling the project

๐Ÿ‘Ž Actual Behavior

Receiving two warnings with dependencies that are not optimized:

Warning: /Users/marcelpochert/Programming/Work/on-campus/node_modules/appwrite/dist/esm/sdk.js depends on 'cross-fetch'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: /Users/marcelpochert/Programming/Work/on-campus/node_modules/appwrite/dist/esm/sdk.js depends on 'isomorphic-form-data'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

๐ŸŽฒ Appwrite version

Different version (specify in environment)

๐Ÿ’ป Operating system

MacOS

๐Ÿงฑ Your Environment

Using version "appwrite": "^9.0.1" Angular Version 14.2.0

Withing an nx mono repo

๐Ÿ‘€ Have you spent some time to check if this issue has been raised before?

๐Ÿข Have you read the Code of Conduct?

lohanidamodar commented 1 year ago

@pauli2406 Thank you for raising the issue. We will get back to you soon.

aallnneess commented 8 months ago

@pauli2406 Hey :-)

Are there any changes here ? I have Appwrite version SDK 13 and still the same behavior.

thanks

stnguyen90 commented 3 weeks ago

We've removed node-fetch and isomorphic-form-data in https://github.com/appwrite/sdk-for-web/releases/tag/15.0.0 so this shouldn't be a problem anymore. Feel free to leave a comment if otherwise.