esbuild_serve
Live Reload. Persistent HTTP Import Resolution. Templates. DevServer. A Deno Web bundler.
Get denoing 🦕🔨
Pages
Pages are a simple way to get going fast.
import { serve } from "https://deno.land/x/esbuild_serve/mod.ts";
serve({
port: 8100,
pages: {
"index": "demo/index.ts"
}
});
Custom Assets
Adding plain assets to your build folder goes like this
import { serve } from "https://deno.land/x/esbuild_serve/mod.ts";
serve({
pages: { "index": "index.ts" },
assets: {
"favicon.ico": "./static/favicon.ico"
}
})
Custom Templates
If you have have a setup like this: serve({ pages: { "/document/page/index": "index.ts" } })
Resoultion will be like this:
/templates/document/page/index.html
If this fails, then:
/templates/index.html
Fallback:
Autogenerated via filename
You can place an html file at these locations.