crater-invoice / crater

Open Source Invoicing Solution for Individuals & Businesses
https://craterapp.com
GNU Affero General Public License v3.0
7.62k stars 1.53k forks source link

Fix assets management #1223

Closed Seb33300 closed 1 year ago

Seb33300 commented 1 year ago

This pull request fixes assets management to use relative path to make to project compatible with the ASSET_URL config. See: https://laravel.com/docs/10.x/vite#custom-base-urls

(I have a very specific hosting platform requiring me to customize the assets URL.)

I also removed all the assets from the public/build folder and added this folder to gitignore because they are generated by the yarn build command and they are not supposed to be versioned in git.

Related issue: https://github.com/crater-invoice/crater/issues/1222

mohitpanjwani commented 1 year ago

This is how I handle assets on my personal project but we want to allow users to just clone the project and start using this without having to run yarn install and create a frontend asset bundle using yarn production

Which is why we cannot delete the public build folder from the repo. This change is good for developers looking to customize crater and work on top of it but it's not good for users who just want to clone or download the app and start using it.

Seb33300 commented 1 year ago

It is not possible to run the app just after doing a git pull in the actual state because you still have to run the composer install command. People using git are 99% developers.

Normal users just download the pre built package here: https://crater.financial/open-source

So I dont really get your point:

but it's not good for users who just want to clone or download the app and start using it.

Anyway, I created another PR without removing the public/build folder.