/** * @file Plugins - fully-specified * @module mkbuild/plugins/fully-specified */ import type { Plugin } from 'esbuild'; /** * Returns a specifier resolver plugin. There are three types of specifiers: * * > - *Relative specifiers* like `'./startup.js'` or `'../config.mjs'`. They * > refer to a path relative to the location of the importing file. *The file * > extension is always necessary for these.* * > - *Bare specifiers* like `'some-package'` or `'some-package/shuffle'`. They * > can refer to the main entry point of a package by the package name, or a * > specific feature module within a package prefixed by the package name as * > per the examples respectively. *Including the file extension is only * > necessary for packages without an [`"exports"`][1] field.* * > - *Absolute specifiers* like `'file:///opt/nodejs/config.js'`. They refer * > directly and explicitly to a full path. * * The resolver adds file extensions to **absolute** and **relative** specifiers * in output content. * * **Note**: [`--experimental-specifier-resolution=node`][2] can be used to * customize the ESM specifier resolution algorithm so that file extensions are * not required. * * [1]: https://nodejs.org/api/packages.html#exports * [2]: https://nodejs.org/api/esm.html#customizing-esm-specifier-resolution-algorithm * * @see https://nodejs.org/api/esm.html#terminology * * @return {Plugin} Specifier resolver plugin */ declare const plugin: () => Plugin; export default plugin;