In the generated lib output (dcraw/dist/dcraw.js), the const variable args is reassigned, which is causing an error (and preventing a valid build). The beautified output below shows this:
const args = [];
if (options) {
...
for (var prop in options) {
const val = options[prop];
if (val !== undefined) {
...
if (prop.match(/[A r C k S n H t o b g q m s]/)) {
args = args.concat(val.toString().split(/\s/)) // <-------- reassignment
}
Solution
The creation of the variable should use the let identifier so that it can be reassigned.
Problem
In the generated lib output (
dcraw/dist/dcraw.js
), the const variableargs
is reassigned, which is causing an error (and preventing a valid build). The beautified output below shows this:Solution
The creation of the variable should use the
let
identifier so that it can be reassigned.