0

one of my LWC component failed to work after the summer'19 release because it is unable to load styles not the script from the static resource

I have included the custom lwc inside a lightning record page

Here is the error which I am facingenter image description here

  • 1
    Welcome to SFSE! Please edit your question to include your code that produces this error. See How to Ask for general expectations for questions. As we are a community, not a support channel, it's preferred that you not include "urgent" or "asap" requests. – David Reed Jun 19 '19 at 1:44
  • I'm using loadScript and it's working fine in Summer '19. As requested, you should share some code to reproduce the error. – Fabien Taillon Jun 19 '19 at 7:56
  • 2
    Looks like this issue is affected few orgs, salesforce.stackexchange.com/questions/266346/… Have you raised a case with SF – Pranay Jaiswal Jun 19 '19 at 11:22
  • I have not raised a case with SF yet, that's why I have posted here to ensure if the error occurs for everyone after summer'19. Because the code was working perfectly fine before the summer'19 release. @PranayJaiswal – Mimitha Ramakrishnan Jun 20 '19 at 2:35
1

Salesforce has listed this as a known issue on their support site, they also have provided a workaround for it.

The current workaround is to create another wrapper lwc custom component and use the custom component with platformResourceLoader in the wrapper.

e.g --- c-lwc-wrapper --

<template> 

<c-lwc-loader></c-lwc-loader> 

</template

where c-lwc-loader uses

import { loadStyle, loadScript } from 'lightning/platformResourceLoader';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.