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', configFile: 'mcfly.config',
cwd: '.', cwd: '.',
}) })
const config = loadedConfig.config ?? { const config = {
components: 'js', components: 'js', // work around for c12.loadConfig not working on Netlify function
...loadedConfig,
} }
const { components: componentType } = config const { components: componentType } = config
let html = await getHtml(path, storage) let html = await getHtml(path, storage)