最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - How to Check Build Output Locally in a Project Without Affecting the Main Codebase? - Stack Overflow

programmeradmin6浏览0评论

I'm currently working on the build output summary for a project and have made some changes to the build configuration (e.g., build.rs). I want to test these changes locally without merging them into the main codebase. Here's the scenario:

  • I've cloned the original repository and made changes to the build file locally.
  • I want to run the build command and check the output to ensure my changes work as expected.
  • The goal is to verify the build output, such as emitted JS chunk sizes, before merging into the main branch.

What are the best practices for checking the build output locally in this situation? How can I ensure my changes are correctly reflected in the build output without affecting the main repository?

Any guidance or examples would be greatly appreciated!

I tried running the actual build command on the actual local codebase which prompts a question saying 'is this "project_name" project?'.

Actually I will like to use the actual NEXTjs build output format for the project so suggestions are also welcomed on that

I'm currently working on the build output summary for a project and have made some changes to the build configuration (e.g., build.rs). I want to test these changes locally without merging them into the main codebase. Here's the scenario:

  • I've cloned the original repository and made changes to the build file locally.
  • I want to run the build command and check the output to ensure my changes work as expected.
  • The goal is to verify the build output, such as emitted JS chunk sizes, before merging into the main branch.

What are the best practices for checking the build output locally in this situation? How can I ensure my changes are correctly reflected in the build output without affecting the main repository?

Any guidance or examples would be greatly appreciated!

I tried running the actual build command on the actual local codebase which prompts a question saying 'is this "project_name" project?'.

Actually I will like to use the actual NEXTjs build output format for the project so suggestions are also welcomed on that

Share Improve this question asked yesterday Habeebullah OkunlolaHabeebullah Okunlola 11 bronze badge New contributor Habeebullah Okunlola is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 1
  • The Rust build script is ran whenever the crate needs to be built. The output of the build script is shown by default if it fails, or with cargo build -vv (though that also contains a lot of other verbose build info to sift through). However, the rest of your post makes me suspicious that you're referring to something else. – kmdreko Commented yesterday
Add a comment  | 

1 Answer 1

Reset to default 0

So you have cloned a repo and made some changes to build config, and want to test it without merging it into the main codebase,

you can run your project after changing the build config,

local changes in the code wont get updated in the online code repository, if you are using version control tools like github,

your code repo from which you cloned the project will only get updated if you push your changes to it via git.

I tried running the actual build command on the actual local codebase which prompts a question saying 'is this "project_name" project?'.

and to this,normally prompts wont pop when you are building a next/react project just make sure you are running the build command i.e

npm run build

or

yarn build

in a cmd terminal

发布评论

评论列表(0)

  1. 暂无评论