Question: How to change output folder for build files.
See original GitHub issueThis is folder’s structure of my project.
project_frontend /
app/
package.json
project_backend/
api/
static/
index.html
So I launch npm run build
from project_frontend and I need to put build files into project_backend. Also I don’t need to put into there files like “manifest.json”, “asset-manifest.json”.
Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Change the build output directory - Visual Studio (Windows)
To place all solution outputs in a common directory · Click on one project in the solution. · On the Project menu, click...
Read more >Use custom build output folder when using create-react-app
Change in your package.json the script item into "build": "react-scripts build && mv build webapp" where webapp is your destination folder; ...
Read more >Refilled, Setting the build output folder of multiple projects with ...
With my ~50 projects set to the same output folder and many of them with the same (nuget) ... So my question again:...
Read more >How to set output directory for all compiled and linked files in ...
Hello, I'm using CCS v6.1.0 and have been having trouble getting the output directory to change for all of the compiled files.
Read more >How to change output directory for managed build
Everything is ok for build and debug, but the outputs (.elf file, .bin, etc...) are generated in Release and Debug directory at the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In your
package.json
you have:You can add another script called
postbuild
that does something after the build and will be called by npm/Yarn automatically.You could also run a custom script that does more.
Hope this helps!
i don’t think this is a valid solution because it assumes that the
build
directory is not being used by some other service. For example, i have backend code that compiles to abuild
directory, then this would also affect those files as well.True, a proper separation of concerns here would be the right move, making each their own codebase and repository, but would definitely like to see an option to set a build-dir option in react scripts