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.
Common errors
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.
Warnings
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.
Install
npm install yakumo-esbuild-yaml yarn add yakumo-esbuild-yaml pnpm add yakumo-esbuild-yaml Imports
- default wrong
const yaml = require('yakumo-esbuild-yaml')correctimport yaml from 'yakumo-esbuild-yaml' - plugin name wrong
import { yaml } from 'yakumo-esbuild-yaml'correctimport yaml from 'yakumo-esbuild-yaml' - type wrong
import { Yake } from 'yakumo-esbuild-yaml'correctimport type { Yake } from 'yakumo-esbuild-yaml'
Quickstart
import yaml from 'yakumo-esbuild-yaml'
// In yakumo config file (e.g., .yakumo.yml)
export default {
plugins: [
// ... other plugins
yaml(),
],
}