Skip to content

Commit e9160bd

Browse files
authored
Add support for __RELATIVEFILE__ (#166)
1 parent bbc6262 commit e9160bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

priv/static/phoenix_live_reload.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ class LiveReloader {
114114
this.channel.push("full_path", {rel_path: file, app: app})
115115
.receive("ok", ({full_path}) => {
116116
console.log("full path", full_path)
117-
let url = this.editorURL.replace("__FILE__", full_path).replace("__LINE__", line)
117+
let url = this.editorURL
118+
.replace("__RELATIVEFILE__", file)
119+
.replace("__FILE__", full_path)
120+
.replace("__LINE__", line)
118121
window.open(url, "_self")
119122
})
120123
.receive("error", reason => console.error("failed to resolve full path", reason))

0 commit comments

Comments
 (0)