Conversation
✅ Deploy Preview for biongff-vizarr ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This pull request attempts to fix deployment issues by adding dependency installation steps before builds and configuring the dev build to output to a separate dist/dev directory, with the .nojekyll file creation moved to a dedicated step.
Changes:
- Added
pnpm ibefore each build command to ensure branch-specific dependencies are installed - Added
--outDir dist/devflag to the dev build command to separate dev and main build outputs - Moved .nojekyll file creation to a separate step after both builds complete
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| echo "Building dev branch output..." | ||
| pnpm build | ||
| touch sites/app/dist/.nojekyll | ||
| pnpm i && pnpm build --outDir dist/dev |
There was a problem hiding this comment.
The --outDir dist/dev flag is being passed to pnpm build, but this won't work as expected. The root pnpm build script runs pnpm build:viewer && pnpm build:app, which eventually calls vite build. The --outDir flag needs to be passed through to the vite command, not to the pnpm script.
You have a few options to fix this:
- Modify the sites/app/vite.config.js to use an environment variable for the output directory
- Use a different build script in sites/app/package.json specifically for dev builds
- Pass the flag differently through the pnpm command chain
Without this fix, the dev build will output to the default location (sites/app/dist), not to sites/app/dist/dev.
| pnpm i && pnpm build --outDir dist/dev | |
| pnpm i && pnpm build -- --outDir dist/dev |
| echo "Building dev branch output..." | ||
| pnpm build | ||
| touch sites/app/dist/.nojekyll | ||
| pnpm i && pnpm build --outDir dist/dev |
There was a problem hiding this comment.
The .nojekyll file is now being created after both builds complete, which creates a problem. Since the dev build is supposed to output to dist/dev, but .nojekyll is being created at sites/app/dist/.nojekyll (the root of the dist folder), this doesn't correctly handle both build outputs.
If the intention is to have both main and dev builds in the same dist folder (main at the root and dev in a subdirectory), you need to ensure that:
- The main build outputs to sites/app/dist
- The dev build outputs to sites/app/dist/dev
- The .nojekyll file is created at sites/app/dist/.nojekyll (which it is)
However, this requires the dev build to actually use the correct output directory (see previous comment about --outDir not working as expected).
| pnpm i && pnpm build --outDir dist/dev | |
| pnpm i && pnpm build --outDir sites/app/dist/dev |
Description
add install to build step and output dev build to dist/dev
Type of change
Checklist
npm test)pre-commit run --all-files)