UNPKG

hot-hook

Version:

Easy hot module reloading (HMR) for Node.js and ESM

7 lines (6 loc) 352 B
import { relative } from 'node:path'; export class FileNotImportedDynamicallyException extends Error { constructor(parentPath, specifier, projectRoot) { super(`The import "${specifier}" is not imported dynamically from ${relative(projectRoot, parentPath)}.\nYou must use dynamic import to make it reloadable (HMR) with hot-hook.`); } }