core: Format. Fix. WIP.

This commit is contained in:
Teffen Ellis
2025-03-28 00:38:59 +01:00
parent 40ab2bccfd
commit 0e57e06191
311 changed files with 46903 additions and 5734 deletions

View File

@ -40,22 +40,13 @@ const name = "mdx-plugin";
* @returns {Plugin} Plugin.
*/
export function mdxPlugin({ root }) {
return { name, setup };
/**
* @param {PluginBuild} build
* Build.
* @returns {undefined}
* Nothing.
*/
function setup(build) {
build.onLoad({ filter: /\.mdx?$/ }, onload);
/**
* @param {LoadData} data
* Data.
* @returns {Promise<OnLoadResult>}
* Result.
* @param {LoadData} data Data.
* @returns {Promise<OnLoadResult>} Result.
*/
async function onload(data) {
const content = String(
@ -77,5 +68,9 @@ export function mdxPlugin({ root }) {
loader: "file",
};
}
build.onLoad({ filter: /\.mdx?$/ }, onload);
}
return { name, setup };
}