Skip to content

Commit 8d7a1fe

Browse files
authored
Merge pull request #4 from gitpod-io/mikenikles/configure-gitpod-3
Add Gitpod configuration
2 parents a469290 + 3e87e73 commit 8d7a1fe

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.gitpod.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# For more details, please see https://www.gitpod.io/docs/references/gitpod-yml
2+
tasks:
3+
- init: npm install
4+
command: |
5+
export HMR_HOST=`gp url 3000`
6+
npm run dev
7+
8+
ports:
9+
- port: 3000
10+
onOpen: open-browser
11+
12+
vscode:
13+
extensions:
14+
- svelte.svelte-vscode
15+
16+
github:
17+
prebuilds:
18+
master: true
19+
branches: true
20+
pullRequests: true

svelte.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ const config = {
1111
adapter: adapter(),
1212

1313
// hydrate the <div id="svelte"> element in src/app.html
14-
target: '#svelte'
14+
target: '#svelte',
15+
vite: {
16+
server: {
17+
hmr: {
18+
clientPort: process.env.HMR_HOST ? 443: 3000,
19+
host: process.env.HMR_HOST ? process.env.HMR_HOST.substring("https://".length) : "localhost"
20+
}
21+
}
22+
}
1523
}
1624
};
1725

0 commit comments

Comments
 (0)