Due to AMO restrictions, we cannot bundle ReactJS.
I copied CDN pre-built scripts into the distribution. For JavaScript, this is fine.
But for TypeScript, we need types. Compiler says I should import ‘react-dom’, but I cannot do this since it means bundling.
I have @types/react
and @types/react-dom
installed, but what to do next?
Also web-ext lint produces the following outputs. Is this OK?
WARNINGS:
Code Message Description File Line Column
UNSAFE_VAR_ASSIGNMENT Unsafe assignment to innerHTML Due to both security and performance concerns, this may not be set using dynamic react/react-dom.production.min.js 2 103943
values which have not been adequately sanitized. This can lead to security issues or
fairly serious performance degradation.
UNSAFE_VAR_ASSIGNMENT Unsafe assignment to innerHTML Due to both security and performance concerns, this may not be set using dynamic react/react-dom.production.min.js 2 103966
values which have not been adequately sanitized. This can lead to security issues or
fairly serious performance degradation.
My understanding is that although these warnings are shown, as long as React is stored as a separate script, they do not lead to rejections. Is this right?