fix: move paraglide:compile to prepare hook to resolve generated imports#68
fix: move paraglide:compile to prepare hook to resolve generated imports#68
Conversation
|
Co-authored-by: nyatinte <104000239+nyatinte@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot このままだとほとんどのscriptでparaglideが行われますが、キャッシュや増分検知などの機構はparaglideに含まれますか? |
Co-authored-by: nyatinte <104000239+nyatinte@users.noreply.github.com>
paraglide-js の one-shot compile( そのため、
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
What
pnpm paraglide:compileto thepreparelifecycle hook sogenerated/paraglide/is created once afterpnpm installknipscript back to justknip(no per-script pre-compile prefix needed)pnpm paraglide:compile &&prefix fromcheckandfixscripts (linting does not require freshly generated output)buildandtypecheckretain their explicitpnpm paraglide:compile &&prefix since they need up-to-date generated code when message files changeWhy
generated/paraglide/is git-ignored and only exists after compilation. Knip was reporting unresolved imports for#paraglide/runtime.jsand#paraglide/messages.jsbecause the generated files didn't exist when it ran.paraglide-js compilehas no input-level caching in one-shot mode — each invocation re-reads the project and regenerates all output. Running it as a prefix on every individual script adds unnecessary overhead on each call. Moving it topreparemeans the cost is paid once perpnpm install, after which all scripts (knip,check,fix, etc.) can rely on the already-present generated files without redundant recompilation.Ref
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.