Closed shurick81 closed 3 years ago
I tested this with waldekm/spfx:1.12.0, waldekm/spfx:1.12.1 and waldekm/spfx:1.13.0. Also tested that this is not an issue with waldekm/spfx:1.11.0 image.
@waldekmastykarz could you help me with troubleshooting this one? How you managed to localize the mapping problem for the previous SPFx versions, when you came up with a workaround? We could have a chat if you have time for this.
OK, I might have an updated solution. Could you please confirm that it works?
In node_modules\@microsoft\spfx-heft-plugins\lib\plugins\webpackConfigurationPlugin\WebpackConfigurationGenerator.js
change line 393 to:
const debugBaseUrl = `https://localhost:4321/${distFolderName}/`;
In node_modules\@microsoft\sp-build-core-tasks\lib\spfxServe\SpfxServeTask.js
change line 109 to:
return new url_1.URL(`https://localhost:4321/`);
This changes are on top of the changes in ./config/serve.json
and ./config/write-manifests.json
.
Hi, I tested these changes that you suggested above with waldekm/spfx:1.13.0 and I managed to add a web part to the SPO hosted workbench! I did not even have to add the debugBasePath
property to the config\write-manifests.json
.
Actually, it even worked with just serve.json
and WebpackConfigurationGenerator.js
for me in Windows. I'm not sure if modification of write-manifests.json
and SpfxServeTask.js
is required for other OSes. Here's a PR: https://github.com/waldekmastykarz/docker-spfx/pull/55
Thanks for checking!
You are welcome! I forgot to mention that I tested on waldekm/spfx:1.12.1 also, so everything looks good
Awesome! I appreciate your help 👏
Starting from the workaround that was suggested for fixing the mapping.
node_modules\@microsoft\sp-build-web\lib\SPWebBuildRig.js
does not contain the lines that were suggested to replace. Hence, we cannot access the bundles.here's how it was tested in Windows:
node_modules\@microsoft\sp-build-web\lib\SPWebBuildRig.js
file contents.