UNSAFE_SCRIPT_ELEMENT: Component creates a script element
| Severity | Fault | Stage |
|---|---|---|
| error | customer (the source package) | build output |
What it means
Section titled “What it means”The component creates a <script> element (createElement(‘script’), or a tag name built at run time), which loads and runs code from outside the published bundle in the host page (rule external-script).
How to fix
Section titled “How to fix”Import the code you need as an allowlisted package so it is bundled and checked; create elements with JSX or with a literal tag name.