Skip to content

Commit

Permalink
Update config example to use a condition that prevents an error on build
Browse files Browse the repository at this point in the history
  • Loading branch information
iansvo authored Aug 13, 2023
1 parent 4324c22 commit da338c5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/toolkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,13 @@ const fs = require('fs')
// Customize this to the appropriate path to your certificate folder
const certPath = '/Users/youruser/.config/valet'
config.devServer.https = {
key: fs.readFileSync(`${certPath}/Certificates/yoursite.test.key`),
cert: fs.readFileSync(`${certPath}/Certificates/yoursite.test.crt`),
ca: fs.readFileSync(`${certPath}/CA/LaravelValetCASelfSigned.pem`),
// Check if devServer is in use and if so, modify the cert files used
if( typeof config.devServer === 'object ) {
config.devServer.https = {
key: fs.readFileSync(`${certPath}/Certificates/yoursite.test.key`),
cert: fs.readFileSync(`${certPath}/Certificates/yoursite.test.crt`),
ca: fs.readFileSync(`${certPath}/CA/LaravelValetCASelfSigned.pem`),
}
}
module.exports = config;
Expand Down

0 comments on commit da338c5

Please sign in to comment.