Import .yml
files in your next.js project.
yarn add --dev next-plugin-yaml
// next.config.js
const withYaml = require('next-plugin-yaml');
module.exports = withYaml({
// other config here
});
Accepts both .yml
and .yaml
file extensions. Uses js-yaml-loader underneath.