Skip to content

Commit 2b52a12

Browse files
Merg
2 parents b6aacbf + e73365c commit 2b52a12

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules/
22
dist/
3+
ui/dist
34
/target/
45
/.cargo/
56
*.happ

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/dist/assets/index-740235c3.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@holochain/client": "^0.16.1",
2020
"@holochain-syn/core": "^0.12.0",
2121
"@holochain-syn/text-editor": "^0.12.0",
22-
"@lightningrodlabs/we-applet": "^0.12.0",
22+
"@lightningrodlabs/we-applet": "^0.12.2",
2323
"@lit/context": "^1.0.0",
2424
"@lit/localize": "^0.12.0",
2525
"@mdi/js": "^7.2.96",

ui/src/notebooks-app.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import "@holochain-syn/core/dist/elements/syn-document-context.js";
3131
import { textEditorGrammar } from "@holochain-syn/text-editor";
3232
import {
3333
AppletServices,
34+
initializeHotReload,
3435
isWeContext,
3536
WeClient,
3637
} from "@lightningrodlabs/we-applet";
@@ -104,6 +105,13 @@ export class NotebooksApp extends LitElement {
104105
client: AppAgentClient;
105106
profilesClient: ProfilesClient;
106107
}> {
108+
if ((import.meta as any).env.DEV) {
109+
try {
110+
await initializeHotReload();
111+
} catch (e) {
112+
console.warn("Could not initialize applet hot-reloading. This is only expected to work in a We context in dev mode.")
113+
}
114+
}
107115
if (isWeContext()) {
108116
const weClient = await WeClient.connect(appletServices);
109117

0 commit comments

Comments
 (0)