perfect-paca
perfect-paca copied to clipboard
image and font cannot display on server side
Hi, I've used integrated some UI library and find out the icon couldn't be displayed. I got this in chrome.
After investigating a while, actually the image files I put in "/assets" can't be displayed either. It's all fine on local server. I was guessing the loaders not working but not really sure what's the cause.
use the nuxt static directory, which is designed for this sort of thing
https://nuxtjs.org/guide/assets#static
note that I'll be updating this to use nuxt.js 1.0 soon-ish as well
@phlogisticfugu Why use static? Webpack should load them from the assets path if they are required.
Static is only for when you need to have a specific url on the server, such as robots.txt
(as per doc you linked)
it's look like when I push code to AWS , it can't return correct document type
It's should be image , but document ...
SVG file is working , but jpg , png can't display .
you might need plugins like serverless-apigw-binary
or serverless-apigwy-binary
to serve images via serverless