yakumo-esbuild-yaml

raw JSON →
0.3.1 verified Fri May 01 auth: no javascript

A yakumo plugin that adds YAML file support to the esbuild compiler. Version 0.3.1. This plugin integrates with yakumo and its esbuild plugin to allow importing .yaml/.yml files as JavaScript objects. Unlike generic yaml loaders for esbuild, this one is specifically designed for the yakumo build system and respects its plugin pipeline. It is a thin wrapper providing a yakumo-specific interface. Releases are periodic, following yakumo ecosystem updates. Ships TypeScript declarations.

error Cannot find module 'yakumo-esbuild-yaml'
cause Package not installed or missing from node_modules
fix
npm install yakumo-esbuild-yaml
error Plugin must be a function or object with 'apply' method
cause Calling the default export incorrectly, e.g., passing arguments when not expected
fix
Use yaml() without arguments (as a factory) or check version compatibility.
deprecated Package version 0.3.0 and earlier used a different default export signature.
fix Update to 0.3.1 and adjust usage: default export no longer requires arguments.
gotcha This plugin only supports YAML files (`.yaml`, `.yml`). It does not handle JSON5 or other data formats.
fix Use separate plugins for other formats.
gotcha Requires both yakumo and yakumo-esbuild as peer dependencies. Missing them will cause runtime errors.
fix Install peer dependencies: npm install yakumo yakumo-esbuild
breaking In version 0.2.x, the plugin was named 'yaml' but exported via a different path. Starting 0.3.0, it is 'yakumo-esbuild-yaml' as a standalone package.
fix Update imports to use the correct package name.
npm install yakumo-esbuild-yaml
yarn add yakumo-esbuild-yaml
pnpm add yakumo-esbuild-yaml

Shows how to import and use the default export of yakumo-esbuild-yaml in a yakumo configuration file.

import yaml from 'yakumo-esbuild-yaml'

// In yakumo config file (e.g., .yakumo.yml)
export default {
  plugins: [
    // ... other plugins
    yaml(),
  ],
}