-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Namespacing of modules #37
Comments
Thanks for opening the issue. This package delegates module resolution to the Could you explain more about the problem you're running into exactly? I don't quite understand the problem space or the solution you're proposing. Thanks! |
When having a Salesforce project, LWC components must be placed in a folder structure like "force-app/main/default/lwc/". When these components is deployed to a Salesforce org, you must refer to the component like In the same project structure, I am running LWC open source to do local development and showcasing of these components in Storybook. Since my components is placed in the given folder structure "force-app/main/default/lwc/", I am not able to refer to them, as on the Salesforce platform, using I would like to override the prefix of the components names, when the module resolver pick up the components.
It can be done on single components ( https://github.com/salesforce/lwc/tree/master/packages/%40lwc/module-resolver#alias-module-record), but i would like to do it for all components no matter what folder structure they are placed within |
Something that I did in the past was just to symlink |
I agree that it could fix the problem, I just think it would be nicer if the module resolver would support this as configuration instead |
Agreed. I did a quick search on GitHub and found a mod that actually provides what you're looking for. |
Thanks for finding the fork from lukethacoder! I still hope they will consider to add the support in the original package :) |
This would greatly help our LWC development process as well! |
Hi
I have a setup where I use storybook to showcase components. In order for me to be able to push the components directly to a Salesforce org they need to be present in the "force-app/main/default/lwc" folder. That means when I run my local server, the components is not registered under the namespace "c" as they are when deployed to Salesforce.
Would it be possible to include an option to define a namspace for each module definition like showcased below?
"modules": [ { "dir": "src/demoComponents" }, { "namespace": "c" "dir": "force-app/main/default/lwc" } ]
Best
Rasmus
The text was updated successfully, but these errors were encountered: