0👍
✅
Correct. Don’t hang variables off the window if you’re not in a UMD environment.
Instead, you could just assign this to vue
directly:
Vue.prototype.$s3bucket = 'https://myassets.s3.us-east-2.amazonaws.com';
Notice I’ve used $
above so you don’t have potential collisions.
Then just use:
:src=`${$s3bucket}/user/${userimage}...`
(You don’t have to use template strings, I just prefer the syntax)
Source:stackexchange.com