the configuration interface for the deno esbuild plugins suite denoPlugins.

interface DenoPluginsConfig {
    importMap: ImportMap;
    getCwd: string | () => string;
}

Hierarchy

Properties

Properties

importMap: ImportMap

{@inheritDoc ResolveImportMapFactoryConfig.importMap}

getCwd: string | () => string

provide an optional function (or a static string) that returns the absolute path to the current working directory. make sure that it always returns a posix-style path (i.e. uses "/" for directory separator, and not "\").

if this is left undefined, then we will leave it up to your runtime-environment's working-directory/path (provided by getRuntimeCwd). here is a summary of what that would entail:

  • for system-bound-runtimes (node, deno, bun): it will use process.cwd() or Deno.cwd().
  • for web-bound-runtimes (webpage, worker, extension): it will use window.location.href or globalThis.runtime.getURL("").
Important

note that if you will be bundling code that imports from npm-packages, you must have your ./node_modules/ folder directly under the working-directory that you provide in this field.