Skip to content

Commit

Permalink
Update vite.config.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Layoric authored Nov 8, 2024
1 parent e160e69 commit a3224cc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions MyApp.Client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ const baseFolder =
? `${env.APPDATA}/ASP.NET/https`
: `${env.HOME}/.aspnet/https`;

const certificateArg = process.argv.map(arg => arg.match(/--name=(?<value>.+)/i)).filter(Boolean)[0];
const certificateName = certificateArg ? certificateArg!.groups!.value : "myapp.client";
if (!certificateName) {
console.error('Invalid certificate name. Run this script in the context of an npm/yarn script or pass --name=<<app>> explicitly.')
process.exit(-1);
}

const certFilePath = path.join(baseFolder, `${certificateName}.pem`);
const keyFilePath = path.join(baseFolder, `${certificateName}.key`);

Expand Down

0 comments on commit a3224cc

Please sign in to comment.