-
Notifications
You must be signed in to change notification settings - Fork 0
Refused to apply style from 'http://localhost:7001/umi.css' #2
Comments
demo please. |
you must change the relate path, because html is render as so if you link some static resource, your should not use but if your path is this lib is just a toy showcase. |
Problem solved when I manually change all resources path from It's a lot weird to modify dist files built by front-end cli for serving static html in egg. Is there a clean way to serve html directly just like I know the best pratice for serving static file is to use static web server such as nginx cdn rather than node itself, but it's much convenint for developer to build tiny project if egg could support this feature. |
it's not an egg issue, but http server. for now, if you don't care the visit url, just place all static file to or if you only need to serve static file, then change egg-static config to use this lib is just a showcase for how to render a static file as template at public dir. |
I am using
egg-view-static
to serve static html resource built bycreate-umi
. The built files was located in app/public dir and the following errors occured when i start the egg server and visit http://localhost:7001.Refused to apply style from 'http://localhost:7001/umi.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled
.Here is the configs:
Is there something i miss?
The text was updated successfully, but these errors were encountered: