-
Notifications
You must be signed in to change notification settings - Fork 16
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
As a developer, I would like an easy way to build and test the production app locally #483
Comments
@gsehrlich "A documented sequence of commands, perhaps in the README, that build and serve the production app locally." I am not sure, but I think the new changes to the |
@gsehrlich Or am I missing something? |
Okay, the title of the issue also mentioned testing. That isn't included in the |
Thanks for asking—this probably needs some clarification. The frontend framework for this app, React, can build in two different ways: "development mode," which is clunky but good for debugging, and "production mode," which has been compiled for distribution over the Internet but much more difficult to debug. There's more about it here: https://stackoverflow.com/questions/48151128/difference-between-production-and-development-build-in-reactjs The instructions you wrote in PR #485 are about deploying the app to be served over the Internet from the Digital Ocean server, which uses React's production mode. This issue is about building and testing the app in production mode, but locally, from the developer's own computer, before deploying it from the server. It's possible that the same Eventually we'll need to document this process, but first we need to figure out the best way to do it. |
@gsehrlich This is interesting. So let me get something straight: why would you want to be able to test the app in the production mode? what is the significance? Is there any benefit to that? Or perhaps, there is something that triggered the need for that. |
Great question! Sometimes the production mode behaves differently from the development mode, unfortunately. See #482 for an example. |
@gsehrlich If I get the problem correctly, it appears there is a clash between the CSS styling that applies in the production and development environment. Is that correct? |
Sort of. I would expect the CSS to behave identically in the production and development environments, but for some reason the production version works differently. So the CSS that looks right in development looks different in production. |
That's interesting. But why is that? Perhaps, there is a need to work on realigning the CSS styling in both environment. Or that won't be necessary? |
"Why is that happening?" is the central question of this open issue. I imagine the solution will require some research! |
@gsehrlich If webpack is the tool used for the production build, then it might be the first place to look at to discover the problem (the research you speak of). at #482, webpack settings was suggested as the place to look at to find out reasons for the CSS mismatch and the redundancy: Are there "webpack settings causing e.g. the redundant <style> tags seen in #453? |
Is your feature request related to a problem? Please describe.
There have been several recent issues (e.g. #482) about differences between the development and production builds of the app. As a developer, I would like to be able to test fixes for the issues. Currently the README contains instructions for building the development version locally, and there's an open issue to document how to deploy the production app remotely (#471), but there's no documented way to build the production app locally.
Describe the solution you'd like
A documented sequence of commands, perhaps in the README, that build and serve the production app locally.
For developers
As an outline, one could first build the production app, then follow all the steps to serve the development app locally, and finally take down the web container and replace it with
serve build
.More ideally, we would have a
docker-compose.livewire-localtest.yml
file that can be included in thedocker-compose
call that gets all the settings right to run the production version of the app locally. This would replacedocker-compose.livewire.yml
in the commands in steps 7 and 8 at the bottom of/.github/deployment.md
.The text was updated successfully, but these errors were encountered: