fix: add workaround for Netlify function

This commit is contained in:
Ayo Ayco 2024-12-31 01:52:01 +01:00
parent a55d669214
commit c288b2235f

View file

@ -27,8 +27,9 @@ export function useMcFlyRoute({ storage }) {
configFile: 'mcfly.config',
cwd: '.',
})
const config = loadedConfig.config ?? {
components: 'js',
const config = {
components: 'js', // work around for c12.loadConfig not working on Netlify function
...loadedConfig,
}
const { components: componentType } = config
let html = await getHtml(path, storage)