Skip to content
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

LWC: Allow on platform folder structure and/or use LWC config files to validate #267

Open
lukethacoder opened this issue Apr 25, 2023 · 0 comments

Comments

@lukethacoder
Copy link

On platform folder structure is a tad different from the open sourced LWC version.

On platform development has no concept of namespaces* (unless you're doing package development) and follows a generic folder structure of:

└── force-app/
    └── main/
        └── default/
            └── lwc/
                └── componentName/
                    ├── componentName.css
                    ├── componentName.html
                    ├── componentName.js
                    └── componentName.js-meta.xml

Through config, the force-app/main/default path may be different. From what I can see in the documentation, the namespacing is expecting the LWCs parent directory to match with the component name.

<lwc-component-name/> is what wca currently would expect from the above folder structure, but the above component would be referenced via <c-component-name/> on platform (c being the default namespace).

On platform development features an sfdx-project.json file to configure package paths. Off platform has the lwr.config.json or lwc.config.json to define namespaces and package folders. Would be neat if these config files could be used to determine if it is a valid LWC vs custom logic around parent folder names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant