mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 10:55:57 +00:00
fix: resolve docs-mdx bin directly in pre-build script
pnpm install creates workspace symlinks but skips bin link creation when dist files don't exist yet. After turbo builds the packages, the dist files exist through the workspace symlink but the bin links remain missing. Using node directly bypasses the bin link entirely.
This commit is contained in:
@@ -3,7 +3,9 @@ import { execSync } from 'child_process';
|
||||
console.log('Running pre-build...');
|
||||
|
||||
try {
|
||||
execSync('npx @hanzo/docs-mdx', { stdio: 'inherit' });
|
||||
// Use node directly instead of npx — pnpm workspace links exist but bin
|
||||
// symlinks may not be created if packages weren't built before pnpm install
|
||||
execSync('node ./node_modules/@hanzo/docs-mdx/dist/bin.js', { stdio: 'inherit' });
|
||||
console.log('Pre-build complete');
|
||||
} catch (error) {
|
||||
console.error('Pre-build failed:', error);
|
||||
|
||||
Reference in New Issue
Block a user