Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/gauntlet/src/server/hmr.ts>EsmHmrEngine

Work-in-progress front-end tool which does put a smile on my face
Latest
class EsmHmrEngine
import { EsmHmrEngine } from "https://deno.land/x/gauntlet@v0.0.9/src/server/hmr.ts";

This is a naive attempt at porting ESM Hot Module Replacement (ESM-HMR) specification from Snowpack, for Deno.

Current quirks:

  • ws is not supported yet on Deno, nor polyfilled by esm.sh
  • deno-websocket doesn't have ws.handleUpgrade

Constructors

new
EsmHmrEngine(options: { server?: EventEmitter<ExpectedServerEvents>; })

Properties

dependencyTree: Map<string, Dependency>

Methods

addRelationship(sourceUrl: string, importUrl: string)
broadcastMessage(data: object)
createEntry(sourceUrl: string)
getEntry(sourceUrl: string, createIfNotFound?)
markEntryForReplacement(entry: Dependency, state: boolean)
removeRelationship(sourceUrl: string, importUrl: string)
setEntry(
sourceUrl: string,
imports: string[],
isHmrEnabled?,
)