What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
馃挜 SharePoint Framework
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
Additional environment details
Issue description
Would it be possible to debug SPFx solutions using Github workspaces?
When I just try to run the solution as is, I get an error in the hosted workbench:
https://steria.sharepoint.com/_layouts/15/workbench.aspx?debug=true&noredir=true&debugManifestsFile=https://shurick81-alexsapozhkov-codespaces-demo-00-77p5r5x73xrpw-4321.githubpreview.dev/temp/manifests.js

I try to dig deeper and checking https://shurick81-alexsapozhkov-codespaces-demo-00-77p5r5x73xrpw-4321.githubpreview.dev/temp/manifests.js in the browser, I'm getting a Bad Gateway error:

Then I try to fix the latter one and do the following changes (that helps for running SPFx gulp serve in containers: https://github.com/pnp/docker-spfx#known-issues):
- Modify
node_modules\@microsoft\spfx-heft-plugins\lib\plugins\webpackConfigurationPlugin\WebpackConfigurationGenerator.js:393
const debugBaseUrl = `${serveConfig.https ? 'https' : 'http'}://${serveConfig.hostname || 'localhost'}:${serveConfig.port || 4321}/${distFolderName}/`;
to:
const debugBaseUrl = `${serveConfig.https ? 'https' : 'http'}://localhost:${serveConfig.port || 4321}/${distFolderName}/`;
- map the workbench to
0.0.0.0, by modifying the ./config/serve.json file in your SharePoint Framework project to:
{
"$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
"port": 4321,
"hostname": "0.0.0.0",
"https": true,
"initialPage": "https://enter-your-SharePoint-site/_layouts/workbench.aspx"
}
I get the response when I request js file then:

However, when I try to run the hosted workbench, I get new issues:

When I look into developer tools in the browser, I can see that the browser is getting proper response from https://shurick81-alexsapozhkov-codespaces-demo-00-77p5r5x73xrpw-4321.githubpreview.dev/temp/manifests.js but then it is trying to access resources from https://localhost:4321/temp/manifests.js and of course fails:

I might guess that the reason is that the file https://shurick81-alexsapozhkov-codespaces-demo-00-77p5r5x73xrpw-4321.githubpreview.dev/temp/manifests.js actually contains a lot of references on the localhost:

What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
馃挜 SharePoint Framework
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
Additional environment details
Issue description
Would it be possible to debug SPFx solutions using Github workspaces?
When I just try to run the solution as is, I get an error in the hosted workbench:
https://steria.sharepoint.com/_layouts/15/workbench.aspx?debug=true&noredir=true&debugManifestsFile=https://shurick81-alexsapozhkov-codespaces-demo-00-77p5r5x73xrpw-4321.githubpreview.dev/temp/manifests.js
I try to dig deeper and checking https://shurick81-alexsapozhkov-codespaces-demo-00-77p5r5x73xrpw-4321.githubpreview.dev/temp/manifests.js in the browser, I'm getting a Bad Gateway error:
Then I try to fix the latter one and do the following changes (that helps for running SPFx gulp serve in containers: https://github.com/pnp/docker-spfx#known-issues):
node_modules\@microsoft\spfx-heft-plugins\lib\plugins\webpackConfigurationPlugin\WebpackConfigurationGenerator.js:393to:
0.0.0.0, by modifying the./config/serve.jsonfile in your SharePoint Framework project to:{ "$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json", "port": 4321, "hostname": "0.0.0.0", "https": true, "initialPage": "https://enter-your-SharePoint-site/_layouts/workbench.aspx" }I get the response when I request js file then:

However, when I try to run the hosted workbench, I get new issues:
When I look into developer tools in the browser, I can see that the browser is getting proper response from https://shurick81-alexsapozhkov-codespaces-demo-00-77p5r5x73xrpw-4321.githubpreview.dev/temp/manifests.js but then it is trying to access resources from https://localhost:4321/temp/manifests.js and of course fails:
I might guess that the reason is that the file https://shurick81-alexsapozhkov-codespaces-demo-00-77p5r5x73xrpw-4321.githubpreview.dev/temp/manifests.js actually contains a lot of references on the localhost: