一覧へ戻る
sapphi-red/vite-plugin-toml(新しいタブで開きます)
主要言語: TypeScript
A plugin for rollup/vite to import a toml file.
- star 数
- 9
- watcher 数
- 1
- fork 数
- 0
- issue 数
- 2
- 最終更新
- 2026/09/01
主要言語: TypeScript
A plugin for rollup/vite to import a toml file.
Toml file plugin for rollup/vite.
The name starts with
vite-plugin-, but this is a historical reason. This plugin does support rollup too.
Uses toml-eslint-parser package for parsing.
Supports Toml 1.0.0.
npm i -D vite-plugin-toml # yarn add -D vite-plugin-tomlAdd plugin in vite.config.js.
import { ViteToml } from 'vite-plugin-toml' export default { plugins: [ViteToml()], }
namedExports (default: false)Enable named exports.
I recommend using typescript-plugin-toml.
Alternatively, add this global declaration.
declare module '*.toml' { const value: unknown export default value }
test.toml
key = 'value'
index.ts
import test from './test.toml' console.log(test.key) // 'value'