firefox:
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.
chrome:
expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream"
翻了一下nextcloud28的更新日志,有提到用vuejs重写了很多东西,而报错的资源文件是mjs。打开nginx.conf和相应目录下的mime.types,发现默认文件类型为
application/octet-stream
代码: 全选
http {
include mime.types;
default_type application/octet-stream;
}
application/javascript
栏目即可。
代码: 全选
types {
- application/javascript js;
+ application/javascript js mjs;
}
其实官方文档七个月前就已经添加了,但谁会注意到呢?除非重装~~~
https://github.com/nextcloud/documentat ... a501eb8f01