UNPKG

@oazmi/esbuild-plugin-deno

Version:

A portable non-invasive suite of esbuild plugins for loading http, jsr, npm, and import-maps. Supports Deno, Node, Bun, Web. Alternate to @luca/esbuild-deno-loader , while compatible with other plugins and native esbuild resolvers (e.g. css loader).

32 lines (31 loc) 1.68 kB
/** a central enum containing the list of esbuild namespaces used by the plugins in this library. */ export var PLUGIN_NAMESPACE; (function (PLUGIN_NAMESPACE) { PLUGIN_NAMESPACE["RESOLVER_PIPELINE"] = "oazmi-resolver-pipeline"; PLUGIN_NAMESPACE["LOADER_HTTP"] = "oazmi-loader-http"; })(PLUGIN_NAMESPACE || (PLUGIN_NAMESPACE = {})); /** a list of default namespaces that esbuild uses for native/entry-point resolution. */ export const defaultEsbuildNamespaces = [undefined, "", "file"]; /** a list of all esbuild content type loaders. */ export const allEsbuildLoaders = [ "base64", "binary", "copy", "css", "dataurl", "default", "empty", "file", "js", "json", "jsx", "local-css", "text", "ts", "tsx", ]; /** an enum that represents special directories. * * currently, it is only being used in {@link NpmPluginSetupConfig.nodeModulesDirs}, and {@link NpmAutoInstallCliConfig.dir}. */ export var DIRECTORY; (function (DIRECTORY) { /** represents your js-runtime's current working directory (acquired via {@link defaultGetCwd}). */ DIRECTORY[DIRECTORY["CWD"] = 0] = "CWD"; /** represents the `absWorkingDir` option provided to your esbuild build config. * * note that in almost all cases, if esbuild's `absWorkingDir` option was not specified, * then we fallback to the current working director (i.e. {@link DIRECTORY.CWD}). * this includes the node package scanner function `validResolveDirFinder` * (generated by {@link findResolveDirOfNpmPackageFactory}), inside of the npm-plugin ({@link npmPluginSetup}). */ DIRECTORY[DIRECTORY["ABS_WORKING_DIR"] = 1] = "ABS_WORKING_DIR"; })(DIRECTORY || (DIRECTORY = {}));