This module provides functionality to build and bundle an Obsidian plugin using esbuild. It includes functions to handle the build process based on different build modes (development or production), and it sets up various esbuild plugins to preprocess, lint, fix source maps, and copy files to the Obsidian plugins folder.
| Function | Description |
|---|
| build | Builds the Obsidian plugin in production mode using esbuild. |
| buildObsidianPlugin | Builds the Obsidian plugin based on the specified mode and configuration folder. |
| dev | Builds the Obsidian plugin in development mode using esbuild with watch. In addition to esbuild’s own source-graph watch, the development build also watches the plugin’s node_modules folder and restarts the whole build (including the type-check) when it changes, so a dependency reinstall or rebuild is picked up. |
| invokeEsbuild | Invokes the build process with the provided build context. |
| Enum | Description |
|---|
| BuildMode | Enumeration representing the build modes. |
| Variable | Description |
|---|
| banner | Banner text to be included at the top of the generated files. |