r3-team / r3

REI3 - Free and open low code
https://rei3.de
MIT License
349 stars 46 forks source link

How to compile frontend files? #54

Closed TechInterMezzo closed 5 months ago

TechInterMezzo commented 5 months ago

How do you compile the frontend files? For example there are these REPLACE_BY_BUILD placeholders and some js files are minified and bundled in the release builds. This does not seem to be part of the go building pipeline.

r3-gabriel commented 5 months ago

For the release builds we use Rollup.js to package and minify the JS code. We do something similar with CSS files but with an internal tool.

After this, the placeholders REPLACE_BY_BUILD in files and file names are replaced with the current build number.

These steps are executed by a number of ugly batch scripts. They are optional however, as r3 runs fine without them. We do this for the release builds to reduce code size and to make sure that browsers cannot use their caches for newer versions. Otherwise, "unoptimized" builds are functionally identical.

TechInterMezzo commented 5 months ago

Thank you for the explanation.