-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add custom config variables for dev server #67
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
Conversation
Co-authored-by: Abdulsattar Mohammed <[email protected]>
| const ldpServerUrl = PreviewUtils.generateWebSocketUrlForLocalDevServer(platform, '8081'); | ||
| const ldpServerUrl = PreviewUtils.generateWebSocketUrlForLocalDevServer( | ||
| platform, | ||
| `${await LwcDevServerUtils.getLocalDevServerPort()}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maliroteh-sf not sure why the port is consumed as a string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have this fixed locally so please ignore for now until my next PR.
| /** | ||
| * The port number of the local dev server. | ||
| */ | ||
| LOCAL_DEV_SERVER_PORT = 'local-dev-server-port', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can /bike-shed on the name since this variable is public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some nits & comments but other than that LGTM
| const ldpServerUrl = PreviewUtils.generateWebSocketUrlForLocalDevServer(platform, '8081'); | ||
| const ldpServerUrl = PreviewUtils.generateWebSocketUrlForLocalDevServer( | ||
| platform, | ||
| `${await LwcDevServerUtils.getLocalDevServerPort()}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have this fixed locally so please ignore for now until my next PR.
| export const LOCAL_DEV_SERVER_DEFAULT_PORT = 8081; | ||
| export const LOCAL_DEV_SERVER_DEFAULT_WORKSPACE = Workspace.SfCli; | ||
|
|
||
| export class LwcDevServerUtils { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I plan on consolidating lwcDevServerUtils.ts and identityUtils.ts into configUtils.ts since the code in both of these are around fetching or writing different config values. But as far as this PR is concerned, we can leave this unchanged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I realized that we are wasting at least next tick since we are loading the same config twice.
What does this PR do?
Adds config variables to customize lwc-dev-server
To be merged after #52
What issues does this PR fix or reference?