-
-
Notifications
You must be signed in to change notification settings - Fork 65
Use vite flag for Paraglide isServer check #379
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
Changes from all commits
8d3c7a3
6b89aed
faeab15
fc2c3ba
00e5ffb
9906bf8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -259,6 +259,20 @@ export function cullCommentary(filePath: string, verbose = false) { | |
|
|
||
| if (verbose) console.log(`✅ Culled LLM commentary in ${filePath}`) | ||
| } catch (error) { | ||
| console.error(`Error cleaning up file ${filePath}:`, error.message) | ||
| console.error( | ||
| `Error cleaning up file ${filePath}:`, | ||
| error instanceof Error ? error.message : String(error) | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| export async function importRuntimeWithoutVite(): Promise< | ||
| typeof import('../../src/lib/paraglide/runtime.js') | ||
| > { | ||
| const runtimeString = await fs.readFile('src/lib/paraglide/runtime.js', 'utf-8') | ||
| const patchedRuntime = runtimeString.replace('import.meta.env.SSR', 'true') | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So let me say this out loud? The scripts that call importRuntimeWithoutVite are clobbered so that if (Presumably because SSR does not end up in the environment. I get it, and sorry.) But... shouldn't it really be false? It gets used in a build context.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replied in the main thread |
||
| const runtime = await import( | ||
| 'data:text/javascript;base64,' + Buffer.from(patchedRuntime).toString('base64') | ||
| ) | ||
anthonybailey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return runtime | ||
| } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heh, we also both fixed this and the other endpoint TS error at the same time. I committed six minutes later, and didn't notice it merged because 585de1d had a tiny Tally warning fix too.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was the result of the broken Git configuration on one of my machines, I tried to merge from main |
Uh oh!
There was an error while loading. Please reload this page.