Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: undefined readFileSync and join in production mode #187

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

zanmato
Copy link
Contributor

@zanmato zanmato commented Nov 28, 2024

This fixes the htmlSource in production mode by adding the missing imports.

This fixes the htmlSource in production mode by adding the missing imports.
Copy link

netlify bot commented Nov 28, 2024

Deploy Preview for agitated-mahavira-26f8f9 canceled.

Name Link
🔨 Latest commit 8433e5c
🔍 Latest deploy log https://app.netlify.com/sites/agitated-mahavira-26f8f9/deploys/674865929628610008d1b25e

@@ -113,7 +115,7 @@ export async function createRoute ({ client, errorHandler, route }, scope, confi
const htmlPath = id.replace(/pages\/(.*?)\.vue$/, 'client/html/$1.html')
const htmlSource = readFileSync(join(config.vite.root, config.vite.build.outDir, htmlPath), 'utf8')
const htmlFunction = createHtmlFunction(htmlSource, scope, config)
handler = (_, reply) => htmlFunction.call(reply)
handler = (_, reply) => reply.html(htmlFunction)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is problematic, reply.html() needs to be htmlFunction. Let me see how can I fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants