Skip to main content TDX, the developer conference for the AI agent era is happening now. Watch live on Salesforce+ for exclusive digital content, a revolutionary keynote, and more.
Rene Plowden 님이 LWC에 글을 올렸습니다

Local dev beta findings

 

When using local dev (beta) your page will fail to compile if your LWC component has a nested folder containing helper js methods.  The issue can be avoided by placing helper js methods in the root directory but I thought it was worth noting since having a nested folder structure with helper methods is allowed when developing and deploying.  For example, I have a testComponent LWC which imports a helper js method which contains static json files from a nested  "data" folder. The presence of testComponent/data/helper.js will result in the page containing the LWC to file to compile with an error:

 

500: Unexpected error fetching "/testComponent": An unexpected error occurred: "ENOENT%3A%20no%20such%20file%20or%20directory5Cforce-app%5Cmain%5Cdefault%5Clwc%testComponent%5Cdata%5ChelperMethod%27"

 

Similarly, if you have an LWC which only contains a .css file, a similar error will occur (requires the js file to be present).  Again probably not a standard pattern, but it is functional and allowable by the platform normally.

 

#LWC Local Development

0/9000