filestack / filestack-js

Official Javascript SDK for the Filestack API and content ingestion system.
https://www.filestack.com
MIT License
206 stars 79 forks source link

Difference between filestack.js and filestack.es2015.js #10

Closed ZeroCho closed 7 years ago

ZeroCho commented 7 years ago

It is quite confusing. In dist folder, there's two javascript files.

If I import filestack-js like below, which file does it imports? filestack.js or filestack.es2015.js? import filestack from 'filestack-js'

If it imports filestack.js, how can i import filestack.es2015.js?

zimme commented 7 years ago

It seems like filestack.es2015.js is used in jsnext:main and module and filestack.js is used in main.

So depending on your build system for your app it might use one or the other but I'm pretty sure that unless you use some of the newer build systems for your app like rollup you'll be using filestack.js via main in package.json.

velveteer commented 7 years ago

@zimme is correct. We are shipping a UMD module and a ES2015 module depending on the appropriate build system. I updated the readme to make this a little more apparent.

@ZeroCho https://github.com/rollup/rollup/wiki/pkg.module