0π
β
In your methods inside require
use empty string to concatenate your path and get string as a result, which require
expects:
getImage(poster) {
return poster ? require("" + poster) : ''
}
You can find more information about that if you read require with expression of the official docs.
Source:stackexchange.com