Registry / devops / esbuild-plugin-toml

esbuild-plugin-toml

JSON →
library0.0.1jsnpmunverified

An esbuild plugin to load TOML files during bundling. Version 0.0.1 is the initial and only release, with no updates since 2021. The package is lightweight and depends on esbuild's plugin API, providing a simple setup. Compared to alternatives like @toml-tools/loader, it is minimal but lacks customization options (e.g., no support for custom parsing or multiple file patterns). It is designed for basic TOML loading use cases.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Package does not export a named function; default import is correct in ESM.

import toml from 'esbuild-plugin-toml'

CommonJS require returns the plugin function directly, not as named export.

const toml = require('esbuild-plugin-toml')

Default import is the plugin function; no named exports.

import toml from 'esbuild-plugin-toml'

Shows how to set up esbuild with the TOML plugin and import a TOML file in JavaScript.

// esbuild.config.js const esbuild = require('esbuild'); const tomlPlugin = require('esbuild-plugin-toml'); esbuild.build({ bundle: true, entryPoints: ['main.js'], outfile: 'out.js', plugins: [tomlPlugin()], }).catch(() => process.exit(1)); // main.js const config = require('./config.toml'); console.log(config);
Debug
Known footguns
gotchaThe plugin only handles .toml files; other extensions are ignored.
deprecatedPackage has not been updated since 2021; may not support newer esbuild versions.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
10 hits · last 30 days
gptbot
3
ahrefsbot
3
claudebot
3
bingbot
1
Resources