crater-invoice / crater

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

Assets management is broken #1222

Open Seb33300 opened 1 year ago

Seb33300 commented 1 year ago

The way you are handling assets path is incorrect and it is not possible to build the project properly.

For example: https://github.com/crater-invoice/crater/blob/05d5ce26fdd8d9466009163444e944259bc0cc2a/resources/scripts/components/base/BaseFileUploader.vue#L565

Return this error: image

As indicated in Laravel documentation, you replace URL by:

const imgUrl = new URL('../../../static/img/default-avatar.jpg', import.meta.url)
Seb33300 commented 1 year ago

I created a PR to fix this issue: https://github.com/crater-invoice/crater/pull/1223 It also add the ability to use the ASSET_URL config option.