Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ghost/core/core/cli/command.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Register the tsx CommonJS loader so dev-only CLI commands (generate-data,
// repl, timetravel) can require TypeScript modules directly. These commands run
// via bare `node index.js <command>`, which — unlike `pnpm dev` (nodemon
// --import=tsx) or the production build (tsc) — has no TS resolution otherwise.
// They are restricted to development/local environments, where tsx is available.
require('tsx/cjs');

const cli = require('@tryghost/pretty-cli');
const logging = cli.ui.log;
const chalk = require('chalk');
Expand Down
Loading