- changed status to open
LWC module auto-import path resolution incorrect
When using shared methods implemented in service LWC components, autocomplete will correctly find the method and add the import declaration. However, the import path will be incorrect. Instead of adding, i.e. import { displayErrorNotification } from "c/notificationUtilities";
it will add import { displayErrorNotification } from "../notificationUtilities/notificationUtilities";
This will cause the component to fail to deploy. Ideally, the import auto-complete should take into account Salesforce specifics.
Comments (9)
-
repo owner -
repo owner -
repo owner - changed status to resolved
I'm going to resolve this assuming(/hoping) that it was originally reproduced on an earlier version. If it's still reproducible on the latest version, please reopen with the specific use case.
-
reporter @Scott Wells apologies for the very late reply, I completely forgot about this. Unfortunately, the issue is present in v2.2.9.8
Here’s what’s I’m getting:
-
repo owner Thank you. Can you please create a simple standalone project with just these two components – it’s fine if everything required to reproduce the issue is just stubbed – and attach it here so that I can try to reproduce it in the exact same context in which you’re seeing it?
-
repo owner Additional fixes delivered in 2.3.0.1.
-
reporter @Scott Wells I can confirm this works correctly now, with one exception. It appears namespaced orgs will have that namespace used instead of the “c/” namespace. The explicit use of namespace is currently not allowed however.
-
repo owner Thanks for letting me know about that instance of the issue. I’ve just committed a fix for the next build.
-
repo owner Fix for namespace variant delivered in 2.3.0.2.
- Log in to comment