YAML

Parcel supports importing YAML files (.yaml or .yml) from JavaScript out of the box.

Example usage

#
app.js:
import data from "./data.yaml";
console.log(data.hello[0]);
// => "world"
data.yaml:
hello:
- world
- computer

YAML files are only converted to JavaScript when imported from JavaScript. When referenced from anywhere else, such as from an HTML file or as a URL dependency in JavaScript, they are copied to the output directory as is.