Closed brucewang585 closed 2 years ago
详细错误提示: index.3e4347a8.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
添加代码 gofound/web/admin/admin.go: import ( "mime" )
func init() { mime.AddExtensionType(".html", "text/html") mime.AddExtensionType(".css", "text/css") mime.AddExtensionType(".js", "text/javascript") }
换linux
详细错误提示: index.3e4347a8.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
添加代码 gofound/web/admin/admin.go: import ( "mime" )
func init() { mime.AddExtensionType(".html", "text/html") mime.AddExtensionType(".css", "text/css") mime.AddExtensionType(".js", "text/javascript") }