vuestorefront / storefront-query-builder

ElasticSearch Query builder from the abstract "SearchQuery" object used by storefront-api, vue-storefront-api and vue-storefront projects
MIT License
7 stars 21 forks source link

Use ES6 target instead of ES5 #29

Open adityasharma7 opened 3 years ago

adityasharma7 commented 3 years ago

Hi team,

First of all, kudos to you all for contributing such an amazing library.

I am using it in Ionic 5/ Angular apps to generate elastic search queries. I noticed the following warning when using it

[ng] Warning: /xxxx.ts depends on 'storefront-query-builder'. CommonJS or AMD dependencies can cause optimization bailouts.
[ng] For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

I think if we build it as ES6 modules instead of ES5, we have the advantage of having tree shaking which can help to reduce the JavaScript payload.

WDYAT?