-
Notifications
You must be signed in to change notification settings - Fork 2k
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
请教一个问题 ,关于上线部署的 #2273
Comments
部署在根目录。nginx 配置访问路径'/'为根目录。主应用和微应用都可以正常运行。 nginx 配置的访问路径为 ’/zj/wechat/app/system/‘。就无法正常访问了 |
我在主应用的 router:base/ vue.config: publicPath 加了前缀 /zj/wechat/app/system/ 。 只有主应用可以访问。 |
你好!您的问题解决了吗?乾坤的主应用可以加前缀吗? |
我解决了,可以实现主应用增加前缀。 代码修改关键点:
nginx配置示例:
nginx配置关键点:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
之前部署在根目录,没有问题,现在后端那边做了转发配置
↓ nginx 的配置
location /zj/wechat/app/system/{
alias /usr/local/nginx/html/system/;
index index.html index.htm;
try_files $uri $uri/ /zj/wechat/app/system/index.html;
}
主应用router :
base: process.env.NODE_ENV === "production" ? "/zj/wechat/app/system/" : "/",
主应用vue.config.js :
publicPath: process.env.NODE_ENV === "production" ? "/zj/wechat/app/system/" : "/",
主应用可以正常显示。
问题出在子应用上,看起来是没有激活路径,点击跳转没有反应
主应用qiankun 的配置 ↓
子应用 render
子应用 vue.config
请问 是哪里 配置有问题吗? publicPath 和 entry 保持了一致。麻烦解答一下。非常感谢
The text was updated successfully, but these errors were encountered: