sindresorhus / get-stream

Get a stream as a string, Buffer, ArrayBuffer or array
MIT License
341 stars 33 forks source link

ES6 code cannot be minified by webpack #20

Closed dvdsgl closed 6 years ago

dvdsgl commented 6 years ago

My project uses get-stream via transitive dependency, so now I cannot deploy my app because webpack chokes on ES6. It's still recommended to publish ES5 on npm.

sindresorhus commented 6 years ago

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: https://github.com/sindresorhus/ama/issues/446

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