-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep the build output in the repository to avoid building on the cloud #1226
Comments
Some additional research: Why do projects like Vue/Three.js check build results to git What if code review remains the same but on every push to the main branch, a GitHub action creates a pull request with the build output - sort of like a "release PR"? |
It's easier to think this in terms of npm packages - which are compiled and then uploaded to npm. Frappe apps are sort of like javascript packages - the end users just want to download it and then update their database. Why "build" any frontend assets? |
I think the idea of "build once" and "download everywhere" makes a lot of sense. Frappe Framework did a version of this where built assets are uploaded to GitHub assets and then downloaded when "bench build" command is run. Now, your approach of committing build output to the repo eliminates unnecessary steps. I think this should be first-class for every Frappe app. |
One problem with this approach is that merging branches (let's say develop -> main) might become an issue since the build outputs might have merge conflicts and there's no way to meaningfully resolve them. I wonder if there's a way to tell git to ignore certain files... oh wait 🤔 |
All SPA apps using Frappe have a build step that does the following:
<app>.html
fileThis is done for all deployments since the generated build output and the index.html files are ignored in git. My question is : why?
I am almost 90% sure that I'm missing something extremely stupid here, but why not just build the app and keep the build output in the repo itself? That way, we don't need to build the app again on the server. This would save (potentially) thousands of hours of build times across apps across multiple benches.
Will check if this works. If anyone has any idea why this won't work, please feel free to share. I'm already convinced that I am missing something basic here.
The text was updated successfully, but these errors were encountered: