https://github.com/silentvoid13/esbuild-plugin-toml
esbuild plugin to import TOML files
https://github.com/silentvoid13/esbuild-plugin-toml
esbuild esbuild-plugin
Last synced: about 1 month ago
JSON representation
esbuild plugin to import TOML files
- Host: GitHub
- URL: https://github.com/silentvoid13/esbuild-plugin-toml
- Owner: SilentVoid13
- License: mit
- Created: 2022-01-16T14:04:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-16T14:04:21.000Z (over 4 years ago)
- Last Synced: 2025-06-30T19:15:48.263Z (12 months ago)
- Topics: esbuild, esbuild-plugin
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# esbuild-plugin-toml
An esbuild plugin to handle toml files.
### Install
```zsh
npm install esbuild-plugin-toml -D
```
```zsh
yarn add esbuild-plugin-toml -D
```
### Usage
`esbuild.config.json`
```js
const esbuild = require('esbuild');
const toml = require('esbuild-plugin-toml');
esbuild.build({
bundle: true,
entryPoints: ['main.js'],
outfile: 'out.js',
plugins: [
toml()
]
}).catch(() => process.exit(1))
```
In your JS files:
```js
const tomlObject = require('example.toml');
```