pnp/docker-spfx

SPFX extension/applicationcustomizer: Cannot open https://localhost:4321/temp/manifest.js

rogereriksen opened this issue · 1 comments

Thanks for sharing the docker spfx image. This is great, but I cannot make it work when generating an extension.

I've created a docker image using waldekm/spfx on Windows.
I then generated a SPFX an applicationcutomizer extension. I followed workaround guidelines to be able to access solution, but I am not able to get a connection to the solution. I can not to open https://localhost/temp/manifest.js.

I successfully followed same guidelines generating a webpart solution.

serve.json is different generating an extension than a webpart, so I added "hostname" = "0.0.0.0" as the only change.

{
  "$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
  "port": 4321,
  "hostname": "0.0.0.0",
  "https": true,
  "serveConfigurations": {
    "default": {
      "pageUrl": "https://myown.sharepoint.com/sites/mysites/SitePages/home.aspx",
      "customActions": {
        "acc65389-0407-4015-9558-b9d9d8764c3e": {
          "location": "ClientSideExtension.ApplicationCustomizer",
          "properties": {
            "testMessage": "Test message"
          }
        }
      }
    },
    "sendAttachmentExtension": {
      "pageUrl": "https://contoso.sharepoint.com/sites/mySite/SitePages/myPage.aspx",
      "customActions": {
        "acc65389-0407-4015-9558-b9d9d8764c3e": {
          "location": "ClientSideExtension.ApplicationCustomizer",
          "properties": {
            "testMessage": "Test message"
          }
        }
      }
    }
  }
}

Thanks for sharing! 👏