TOML
Parcel 支持使用 @parcel/transformer-toml
插件从 JavaScript 导入 TOML 文件。当检测到 .toml
文件时,它将自动安装到你的项目中。
¥Parcel supports importing TOML files from JavaScript using the @parcel/transformer-toml
plugin. When a .toml
file is detected, it will be installed into your project automatically.
用法示例
#¥Example usage
app.js:
import data from './data.toml';
console.log(data.hello[0]);
// => "world"
data.toml:
hello = [
"world",
"computer"
]