|
|
|
|
|
by Osiris
3805 days ago
|
|
npm needs to learn how to deal with that. For example, if a package is marked as requiring 5.4, but you have 4.2, then it should automatically use a tool like babel to convert unavailable ES6 syntax to ES5 for compatibility. I really want to be able to write my modules to take advantage of ES6 while not having to build all that babel stuff into my module for compatibility. |
|
Suppose you could transpile what is possible, then throw errors otherwise, however that would involve parsing each file in an NPM module which is probably an unreasonable task performance wise.