Skip to content

Conversation

@bpbuch
Copy link
Contributor

@bpbuch bpbuch commented Jul 8, 2025

What does this PR do?

Moving component preview to an org-based solution using the LWR preview application, and removes the local-only component development flow.

With this transition, the usage of @lwrjs for the local dev server is replaced with the lwc-dev-server.

What issues does this PR fix or reference?

@W-18289065@

@bpbuch bpbuch self-assigned this Jul 8, 2025
@bpbuch bpbuch requested review from a team as code owners July 8, 2025 20:37
@bpbuch bpbuch force-pushed the component-preview branch from 033217b to 091acdb Compare July 8, 2025 20:39
);

// Open the browser and navigate to the right page
await this.config.runCommand('org:open', launchArguments);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bpbuch I need to be able to get the proper URL and iframe it inside of the VSCode webview. Right now it works because I know the URL is localhost, but with this change how will I be able to get the right URL and set that into the iframe?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also we still want a way to not automatically launch the browser when running the command in VSCode / Code Builder (i.e. we only want to open the preview panel)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how will I be able to get the right URL and set that into the iframe?

We will need to follow up this PR with a programatic way to start the local dev server and access the target org URL(containing the local dev server URL and token). Alternatively, the VS Code extension could directly configure, launch, and manage the local dev server without a dependency on the CLI.

we still want a way to not automatically launch the browser

For the CLI use case, I think launching the browser is almost required because the local dev server port and user token are resolved when the command is invoked. For VS Code, the programmatic access should solve this problem as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a followup work item for @Shinoni to take a look at

@bpbuch bpbuch force-pushed the component-preview branch from 1f731b3 to f3fc413 Compare July 11, 2025 18:07
@nrkruk nrkruk merged commit 2d9fb17 into main Jul 11, 2025
12 checks passed
@nrkruk nrkruk deleted the component-preview branch July 11, 2025 18:59
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

Successfully merging this pull request may close these issues.

3 participants