Dynamic imports for platformResourceLoader
Why is this an issue?
Salesforce no longer allows dynamic imports of the lightning/platformResourceLoader module. You must use a static import declaration instead.
Examples
Example of incorrect code:
const loader = await import("lightning/platformResourceLoader");
Example of correct code:
import { loadScript, loadStyle } from 'lightning/platformResourceLoader';
How can I fix violations?
Replace the dynamic import() call with a static import declaration at the top of your module.
Resources
