We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9da8450 commit 047dce9Copy full SHA for 047dce9
src/preview.ts
@@ -45,9 +45,9 @@ class Server {
45
46
_handleRequest: RequestListener = async (req, res) => {
47
console.log(req.method, req.url);
48
- const url = new URL(req.url!, "http://localhost");
49
- let {pathname} = url;
50
try {
+ const url = new URL(req.url!, "http://localhost");
+ let {pathname} = url;
51
if (pathname === "/_observablehq/runtime.js") {
52
send(req, "/@observablehq/runtime/dist/runtime.js", {root: "./node_modules"}).pipe(res);
53
} else if (pathname.startsWith("/_observablehq/")) {
0 commit comments