use yaml instead of json for object detector docs

This commit is contained in:
Josh Hawkins
2026-07-07 11:10:48 -05:00
parent 8ff7be43b6
commit 3f63311fcc
6 changed files with 1343 additions and 350 deletions
+23
View File
@@ -0,0 +1,23 @@
const path = require("node:path");
// Enables importing YAML data files from docs/data as plain JS objects.
// Scoped to the data directory so it never intercepts other .yaml files
// (e.g. the OpenAPI spec under static/).
module.exports = function (context, options) {
return {
name: "yaml-data-loader",
configureWebpack(config, isServer, utils) {
return {
module: {
rules: [
{
test: /\.ya?ml$/,
include: path.resolve(__dirname, "..", "data"),
use: path.resolve(__dirname, "js-yaml-loader.js"),
},
],
},
};
},
};
};