YuriGor / deepdash

eachDeep, filterDeep, findDeep, someDeep, omitDeep, pickDeep, keysDeep etc.. Tree traversal library written in Underscore/Lodash fashion
https://deepdash.io/
MIT License
274 stars 12 forks source link

Transpile for ES5 / IE11 (object literal property value shorthand notation) #67

Closed jnachtigall closed 4 years ago

jnachtigall commented 4 years ago

Similar to https://github.com/YuriGor/deepdash/issues/28

In the code I only use findValueDeep via import findValueDeep from "deepdash-es/findValueDeep";

In IE 11 this results in:

Error SCRIPT1003: ':' expected

image

Looking at the generated file, it seems like object literal property value shorthand notation is not being transpiled. Maybe a rule is missing for this.

Current Workaround:

In webpack.config.js add deepdash, so it is also transpiled by my App:

          include: [
            path.resolve("./node_modules/deepdash-es"),
          ],
YuriGor commented 4 years ago

Sorry for the late response and thank you for report. I think I will finally switch to babel

YuriGor commented 4 years ago

I just noticed you are using 'deepdash-es' -es version of the package is not transpiled intentionally to let the bundler of your choice do the job. Only cjs 'deepdash' package is transpiled (including /browser versions)