Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(@vben/docs): update nginx deployment error related documentation #4702

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/src/en/guide/other/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
```

Solution:
Solution 1:

```bash
http {
#If there is such a configuration, it needs to be commented out
#include mime.types;

wangjue666 marked this conversation as resolved.
Show resolved Hide resolved
types {
application/javascript js mjs;
}
}
```

Solution 2:

Open the `mime.types` file under `nginx` and change `application/javascript js;` to `application/javascript js mjs;`
9 changes: 8 additions & 1 deletion docs/src/guide/other/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
```

解决方式
解决方式一

```bash
http {
#如果有此项配置需要注释掉
#include mime.types;

types {
application/javascript js mjs;
}
}
```

解决方式二:

进入 `nginx` 下的`mime.types`文件, 将`application/javascript js;` 修改为 `application/javascript js mjs;`