Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions packages/office-addin-dev-settings/src/sideload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,9 @@ export async function generateSideloadUrl(
if (!manifest.id) {
throw new ExpectedError("The manifest does not contain the id for the add-in.");
}

if (
manifest.defaultSettings === undefined ||
manifest.defaultSettings.sourceLocation === undefined
) {
throw new ExpectedError("The manifest does not contain the SourceLocation for the add-in");
}

manifest.defaultSettings = manifest.defaultSettings ?? {};
manifest.defaultSettings.sourceLocation = manifest.defaultSettings.sourceLocation ?? "https://localhost:4000";
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure this is the right default. It assumes that people are deploying their test add-in code to localhost:4000 which isn't even the location used in the add-in projects we generate from templates using 'yo office' (which is port 3000) and in those it is written that way into the manifest.


const sourceLocationUrl: URL = new URL(manifest.defaultSettings.sourceLocation);
if (sourceLocationUrl.protocol.indexOf("https") === -1) {
Expand Down