The LWC engine provides "extra" security measures
LWS confines them to a sandbox where they access a virtual copy of the global window object.
Is it possible to support
(function (global) {
global = global || self;
global.myFunction = function () {};
})(this);
context
additional context
Happy to contribution, this may be an issue with the https://github.com/kurkle/color#readme which is included in the umd bundle for chartjs.
seems this is the conflicting spot
https://github.com/chartjs/chartjs-plugin-annotation/blob/1e95744fb98e6fe9426f8b6a7bd17b1fcdee2f42/src/annotation.js#L53C6-L59C10
const value = annotationOptions[key];
if (isObject(value)) {
value.id = key;
annotations.push(value);
}
});
}