crater-invoice/crater

Assets management is broken

Seb33300 opened this issue · 1 comments

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

For example:

const imgUrl = new URL('/img/default-avatar.jpg', import.meta.url)

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)

I created a PR to fix this issue: #1223
It also add the ability to use the ASSET_URL config option.