-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Manually creating mocks and defining module name/path is a PITA.
"modules": [
{
"name": "@salesforce/messageChannel/CustomChannelOne",
"path": "./__mocks__/@salesforce/messageChannel/CustomChannelOne.js"
},
{
"name": "@salesforce/messageChannel/CustomChannelTwo",
"path": "./__mocks__/@salesforce/messageChannel/CustomChannelTwo.js"
}
]Describe the solution you'd like
Instead of having to manually define messageChannel imports, auto-calculate them as part of a custom module resolver or hook, adding to the existing @lwc-garden/utils package.
Take the import "@salesforce/messageChannel/CustomChannelTwo" and return a new LMS instance (see here)
Describe alternatives you've considered
Could build a script that dynamically updates the lwr.config.json modules array.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request