sindresorhus / pokemon

Get Pokémon names

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't use this package in create-react-app

dominik-th opened this issue · comments

It uses some of ES2015 features, like template strings or arrow functions.

When trying to build a create-react-app it fails with the following error:

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file: 

 	./node_modules/pokemon/index.js:6 

Read more here: http://bit.ly/2tRViJ9

It would be nice to publish an ES5 version to npm.

https://github.com/bookercodes/articles/blob/master/how-to-build-and-publish-es6-npm-modules-today-with-babel.md

We aim for Node.js, not the browser. You can find a more detailed explanation here sindresorhus/ama#446.

If you use Webpack, check out babel-engine-plugin, which transpiles only the dependencies that needs to be transpiled.