sindresorhus/normalize-url

Build error since 2.0

Closed this issue · 1 comments

Hey,

I've got this build error since upgrading to 2.0:

ERROR in client/vendors.d55dcbf0858efaced2d1.js from UglifyJs
    Unexpected token: operator (>) [/root/code/node_modules/normalize-url/index.js:29,0][client/vendors.d55dcbf0858efaced2d1.js:32802,29]

Downgrading to 1.9.1 for now.

Thanks anyways for this awesome lib!

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.