Skip to content

Commit

Permalink
Delay preview to wait for built files
Browse files Browse the repository at this point in the history
  • Loading branch information
nmn committed Dec 5, 2023
1 parent 3f6d2bc commit 087dfed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions apps/docs/components/Playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ export default function Playground() {
console.log('Waiting for server-ready event...');
containerInstance.on('server-ready', (port, url) => {
console.log('server-ready', port, url);
setUrl(url);
// TODO: Figure out hot reloading
// TODO: Figure out how to start server *after* build
setTimeout(() => {
setUrl(url);
}, 5000);
});

// const output = await containerInstance.fs.readFile('output.js', 'utf-8');
// setOutput(output);
};

useEffect(() => {
Expand Down

0 comments on commit 087dfed

Please sign in to comment.