diff --git a/examples/default-provider/next.config.mjs b/examples/default-provider/next.config.mjs index 65f7b6c..77613a7 100644 --- a/examples/default-provider/next.config.mjs +++ b/examples/default-provider/next.config.mjs @@ -1,4 +1,5 @@ import { withNextVideo } from 'next-video/process'; +import { readFile } from 'node:fs/promises'; /** @type {import('next').NextConfig} */ const nextConfig = (phase, { defaultConfig }) => { @@ -7,7 +8,14 @@ const nextConfig = (phase, { defaultConfig }) => { }; }; -export default withNextVideo(nextConfig); +export default withNextVideo(nextConfig, { + loadAsset: async function (assetPath) { + console.warn(99, assetPath); + const file = await readFile(assetPath); + const asset = JSON.parse(file.toString()); + return asset; + }, +}); // Amazon S3 example // export default withNextVideo(nextConfig, {