Skip to content

Conversation

dsanders11
Copy link

Useful for being able to execute some code specific to the dev server, for example, automatically generating a localhost cert for HTTPS:

devServer: () => { // If no localhost.crt, generate it here and output to disk return { https: { key: fs.readFileSync('./localhost.key'), cert: fs.readFileSync('./localhost.crt') } } }

Would probably be most useful if it could return a Promise, but looking at where it needs to be accessed I'm not sure that's possible in a clean way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants