baruchvlz / resq

React Element Selector Query (RESQ) - Query React components and children by component name or HTML selector
MIT License
174 stars 27 forks source link

fix: πŸ› transpile build #53

Closed mvasin closed 4 years ago

mvasin commented 4 years ago

With the previous setup, build wasn't transpiled with babel, because babel-loader was not used in the webpack config.

Here's the difference in the build before and after changes:

Screenshot 2020-02-08 at 11 58 03

You can tell that output was ES6, not ES5, that for instance creates problems for uglify-js (that I use in my project) which does not support ES6.

This fix can potentially help with issue #51 (notice there are const used throughout the build, while IE11 supports const only partially, and there are probably other ES6-related quirks in IE11), but I did not test that.

codecov[bot] commented 4 years ago

Codecov Report

Merging #53 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #53   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines         143    143           
  Branches       37     37           
=====================================
  Hits          143    143

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 3e07ce3...ee6f4f5. Read the comment docs.

baruchvlz commented 4 years ago

Thanks for fixing this. Could you rebase with master? I've added package-lock.json to the git ignore file. Please use yarn instead and update the yarn.lock file with babel-loader.

mvasin commented 4 years ago

@baruchvlz Done! But please have a look at this article: https://dev.to/gajus/stop-using-package-lock-json-or-yarn-lock-3ddi It recommends adding lock files to applications, not to libraries.

baruchvlz commented 4 years ago

@mvasin Thanks for sharing that article, does make sense not to have a lock file for libraries. If you'd like you can remove the yarn.lock file and add it to the gitignore in this PR.

mvasin commented 4 years ago

Done!

baruchvlz commented 4 years ago

Thanks for taking care of this.