chore(@vben/docs): update nginx deployment error related documentation (#4702)
This commit is contained in:
parent
bfaa2780ab
commit
625862e082
@ -141,12 +141,19 @@ After deploying to `nginx`,you might encounter the following error:
|
|||||||
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec.
|
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec.
|
||||||
```
|
```
|
||||||
|
|
||||||
Solution:
|
Solution 1:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
http {
|
http {
|
||||||
|
#If there is such a configuration, it needs to be commented out
|
||||||
|
#include mime.types;
|
||||||
|
|
||||||
types {
|
types {
|
||||||
application/javascript js mjs;
|
application/javascript js mjs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Solution 2:
|
||||||
|
|
||||||
|
Open the `mime.types` file under `nginx` and change `application/javascript js;` to `application/javascript js mjs;`
|
||||||
|
@ -141,12 +141,19 @@ at Extract (vue-vben-admin-main\node_modules@purge-icons\core\dist\index.js:173:
|
|||||||
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec.
|
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec.
|
||||||
```
|
```
|
||||||
|
|
||||||
解决方式:
|
解决方式一:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
http {
|
http {
|
||||||
|
#如果有此项配置需要注释掉
|
||||||
|
#include mime.types;
|
||||||
|
|
||||||
types {
|
types {
|
||||||
application/javascript js mjs;
|
application/javascript js mjs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
解决方式二:
|
||||||
|
|
||||||
|
进入 `nginx` 下的`mime.types`文件, 将`application/javascript js;` 修改为 `application/javascript js mjs;`
|
||||||
|
Loading…
Reference in New Issue
Block a user