filestack / filestack-js

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

Bundle size #298

Open rtymchyk opened 5 years ago

rtymchyk commented 5 years ago

Are there any plans on optimizing size of the library? It's getting pretty inflated:

Screen Shot 2019-10-26 at 5 22 07 PM
pcholuj commented 5 years ago

Hi. Yes we have plans to lower bundle size and make it "tree-shakable"

rtymchyk commented 5 years ago

Tree-shaking would definitely help. We only use the 'transform' functionality of the library, which I imagine is tiny in comparison to the rest of the source.

molszanski commented 5 years ago

@rtymchyk does import { Client } from "filestack-js" help?

rtymchyk commented 5 years ago

@rtymchyk does import { Client } from "filestack-js" help?

No difference

rtymchyk commented 4 years ago

@molszanski @pcholuj Hate to ping again, but is there anything scheduled for either trimming the size or just introducing tree shaking?

Notice in my screenshot below, it was 1.x.x, at 31kgb gzipped. At 2.0.5 (I'm using right now) it's 45kb gzipped. An upgrade to 3.18.0, I'm looking at almost 70kb gzipped. It's slowly creeping up and I'm using just a few tiny APIs from the library.

molszanski commented 4 years ago

Yup, same here.

This is all I use:

import { Client } from "filestack-js"
this.client = new Client(conf.apiKey)

const rez = await this.client.upload(file, {}, s3StoreOptions)
const transoformUri = this.client.transform(originalFsHandle, transformation.filestackTransformOpts)
const meta = await this.client.metadata(uploaded.filestackHandle, {
      width: true,
      height: true,
      md5: true,
      mimetype: true,
    })

Feel like writing my own client atm

rtymchyk commented 4 years ago

Yup, same here.

This is all I use:

import { Client } from "filestack-js"
this.client = new Client(conf.apiKey)

const rez = await this.client.upload(file, {}, s3StoreOptions)
const transoformUri = this.client.transform(originalFsHandle, transformation.filestackTransformOpts)
const meta = await this.client.metadata(uploaded.filestackHandle, {
      width: true,
      height: true,
      md5: true,
      mimetype: true,
    })

Feel like writing my own client atm

Oops, sorry, for some reason I thought you were a maintainer here.

I'm using transform and picker. If it wasn't for the picker, I'd definitely just make my own utility :/

pcholuj commented 4 years ago

Hi we have plans to reduce sdk size, but it can take some time. Probably in 4.x.x it will be resolved

rtymchyk commented 4 years ago

Hi we have plans to reduce sdk size, but it can take some time. Probably in 4.x.x it will be resolved

Thanks for the update!

molszanski commented 3 years ago

Bundle size seems to be growing. We are considering switching to something else with less footprint

Orlandster commented 2 years ago

@pcholuj are there any updates on that? The bundle size is indeed concerning.

molszanski commented 2 years ago

But no rush

pcholuj commented 2 years ago

Hi, sorry I`m no longer maintaining this repository.

Orlandster commented 2 years ago

@pcholuj thanks for letting us know. Does this mean the repository is no longer maintained or is it only you who is no longer maintaining it?