Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix autoload #19

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions client/scripts/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function serve() {
const config = getBuildConfig({
sourcemap: true,
banner: {
js: `new EventSource('/esbuild').onmessage = () => location.reload();`, // Shorter reload script
js: `new EventSource('/esbuild').addEventListener('change', () => location.reload());`,
},
});

Expand All @@ -30,7 +30,8 @@ async function serve() {
});

// Watch *.ts files
ctx.watch();
await ctx.watch();
console.log('watching...');

const { host, port } = server;
console.log(`Server is running at http://${host}:${port}`);
Expand Down
6 changes: 3 additions & 3 deletions client/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"@patternfly/icons/": "/node_modules/@patternfly/icons/"
}}
</script>
</head>
<body>
<planner-app></planner-app>
<script type="module">
import "./index.js";
</script>
</head>
<body>
<planner-app></planner-app>
</body>
</html>
Loading