Skip to content

fix(core): create dist/ before copying index.css - #184

Open
Laptopmini wants to merge 1 commit into
imskyleen:mainfrom
Laptopmini:fix/core-build-create-dist
Open

Laptopmini wants to merge 1 commit into
imskyleen:mainfrom
Laptopmini:fix/core-build-create-dist

Conversation

@Laptopmini

Copy link
Copy Markdown

Fixes #183

On a fresh clone the first pnpm build fails in @bprogress/core (ENOENT ... copyfile './src/index.css' -> './dist/index.css'), and turbo skips everything that depends on it. tsup runs esbuild with write: false and creates dist/ only after esbuild returns, so the copy-css onEnd hook runs before the directory exists. The hook now creates dist/ first.

Tests

  • New worktree from main with no dist/ anywhere: pnpm build passes (6/6 tasks). On main the same first build fails (0 of 5 tasks).
  • packages/core from an empty dist/: 2 of 2 builds pass, with all 6 output files.
  • Build output is byte-identical to main's (all 6 files in packages/core/dist), so there's no changeset.
  • pnpm lint and pnpm test: pass.

tsup.config.ts already used double quotes, which .prettierrc flags, so I kept the existing style rather than reformat the file.

tsup runs esbuild with write: false and writes dist/ only after esbuild
returns, so the copy-css onEnd hook ran before dist/ existed and the first
build on a fresh clone failed with ENOENT.

Fixes imskyleen#183
@vercel

vercel Bot commented Nov 16, 2026

Copy link
Copy Markdown

@Laptopmini is attempting to deploy a commit to the Skyleen Team Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

pnpm build fails on a fresh clone: core's copy-css plugin copies into dist/ before it exists

1 participant