Published transpiled source
skeggse opened this issue · 1 comments
The class
syntax is available in node 6+, and modern browsers, but isn't supported by uglify. Could we publish a transpiled copy of quick-lru
in npm for older targets/minification? That's the recommendation I've sometimes seen, as you might have many many dependencies and transpiling all of them whenever you make a change to your application can take unnecessary time. It's also what rollup-plugin-babel recommends, for what it's worth.
EDIT: I just noticed that quick-lru
very recently deprecated support for node <6, but I think this is still worth considering given that some automated tools may not support anything more than es5 syntax.
This module mainly targets Node.js, not the browser. It's up to you to transpile it with Babel if you want to use it in 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.