URI.js icon indicating copy to clipboard operation
URI.js copied to clipboard

Requiring a lower version of punycode

Open KristiyanVachev opened this issue 6 years ago • 1 comments

Is it possible to lower the requirement for "punycode": "^2.1.0" to "punycode": "^1.4.1"?

The difference between punycode 1.4.1 and punycode 2.1.0 is just that the latter is written in ES6.

The current version supports recent versions of Node.js only. It provides a CommonJS module and an ES6 module. For the old version that offers the same functionality with broader support, including Rhino, Ringo, Narwhal, and web browsers, see v1.4.1. -- punycode.js

When punycode 2.1.0 is used under IE11, it breaks with SCRIPT1002: Syntax error , because some ES6 constructs aren't supported.

I had this problem on the application I'm developing, and I fixed it by downgrading punycode to 1.4.1. Unfortunately your package doesn't allow a version lower than 2.1.0 and I'm afraid that it would break again if the punycode you are dependent on is used under IE11.

KristiyanVachev avatar Nov 14 '18 09:11 KristiyanVachev

what kind of setup are you using? require.js, webpack, …? all of these should allow you to override imports like punycode to use whatever version you need (or even transpile it using babel).

rodneyrehm avatar Nov 17 '18 04:11 rodneyrehm