Comments (8)
这样直接访问 bar-app 吗,这个主要需要服务端做相应支持,使得直接访问子应用时返回主应用的 html 文件,单独访问子应用则使用特定的路径 bar-app/source.html
from vue-cli-plugin-qiankun.
是的,重定向是一种做法,但总感觉不是那么的爽,而且当项目庞大时需要维护一个很长的nginx配置文件,所以更倾向于一种纯前端解决的方式,qiankun官网的demo只有开发者模式还没仔细看如何build。不知道官网的例子里是否有解决方案
from vue-cli-plugin-qiankun.
你们的子应用有单独访问的需求吗,目前是怎么部署的?
我这个仓库相当于把所有应用部署在了一起,这样 nginx 其实正常配置一下就行,只是子项目不能生成 index.html 文件了
分开部署的话其实是没有这个问题的
from vue-cli-plugin-qiankun.
我们可能有单独访问的需求,但我现在只是把你的examples build以后再用anywhere打开主应用的index,不用单独访问子应用就默认首页刷新就找不到了,如果真是这样的话每个子应用nginx都做下重定向肯定是不合理的
from vue-cli-plugin-qiankun.
默认会打开 foo-app 这个子应用,nginx 加一条这个配置就行
location / {
try_files $uri $uri/ /index.html;
}
from vue-cli-plugin-qiankun.
试了下一样的,可能是我把你demo里的一些配置改了下,当时发现编译后直接dist里起anywhere资源加了/vue-cli-plugin-qiankun/,就把主应用里APP.vue里的改了下,但应该不改也是一样的,我等会改回去再试下。如果方便的话可以加个微信好沟通,我微信号hp6120c
from vue-cli-plugin-qiankun.
生产环境下改了 publicPath,你可以自己试试看先 .env.production
from vue-cli-plugin-qiankun.
试过了,还是不行
from vue-cli-plugin-qiankun.
Related Issues (14)
- 引用组件路径过长问题 HOT 2
- 在对应子模块下刷新的问题 HOT 1
- 父应用无法感知子应用路由切换
- 有办法将已有的vue项目转化为主项目或者子项目吗? HOT 2
- vuejs DevTools 无法调试微前端项目 HOT 1
- 安装不了依赖。 HOT 8
- qiankun 2.x版本有实践么? HOT 9
- 想要做一个公共组件应用,其他的组件如何引用呢?
- "export 'ɵBrowserPlatformLocation' was not found HOT 2
- examples里的子项目报eslint的错误. 我确定eslint都是被安装过的 HOT 2
- application 'foo-app' died in status LOADING_SOURCE_CODE: Failed to fetch HOT 20
- 如果我用vue/cli创建项目时选择 Vue3-preview, 这个插件就不行 HOT 7
- mounted方法调用两次
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-cli-plugin-qiankun.