Closed pkalita-lbl closed 1 year ago
Transpile means convert javascript into other target languages? So are you saying this code hides some ES6 import/export plumbing? I'm not quite following but I trust your modifications.
Ah sorry. Transpile in this context means converting JavaScript that uses newer language features into JavaScript that only uses older language features. Often toolchains (webpack, rollup, etc) will assume that code brought in as a dependency (i.e in node_modules
) adheres to some baseline JavaScript language level and parse it strictly according to that spec. So if it encounters some newish feature (like, say, the &&=
operator, introduced around 2021) it will not be able to parse it.
The need for this came up in the process of integrating the published library components into the NMDC project. Downstream clients like that will not generally want to have to transpile ES6 features being used here (e.g. class field declarations) themselves.