-
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
doc: add some frequently questions to the FAQ #948
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit 有点问题,rebase 一下到 master 分支吧
docs/faq/README.zh.md
Outdated
@@ -294,7 +294,7 @@ qiankun 依赖的 import-html-entry 通过 `window.fetch` 来获取微应用的 | |||
</div> | |||
</body> | |||
|
|||
+ <script src="//yourhost/entry.js" entry></script> | |||
+ <script src="//yourhost/entry.js" entry /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
script 标签不是自闭和的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PeachScript 这个问题知道不
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PeachScript 这个问题知道不
应该是 dumi 1.0 的 bug,我提个 PR 升级到 1.1 beta
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
升到 beta 就好了 #974
docs/api/README.zh.md
Outdated
- entry - `string | { scripts?: string[]; styles?: string[]; html?: string }` - 必选,微应用的 entry 地址。 | ||
|
||
- entry - `string | { scripts?: string[]; styles?: string[]; html?: string }` - 必选,微应用的入口。 | ||
- 配置为字符串时,表示微应用的访问地址。如果微应用部署在二级目录,则最后面的 `/` 不可省略。例如,微应用的访问地址是:`https://qiankun.umijs.org/guide`,那么 `entry` 应该是 `https://qiankun.umijs.org/guide/`。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
尾部 slash 要不要省略建议写到 FAQ 或者 cookbook 里关于二级目录方式部署的章节吧,因为不是所有通过 https://qiankun.umijs.org/guide 访问的场景都需要加 slash,需要更精确的一些特定场景描述,不然在这里看到 api 描述的用户可能会选择无脑加,最后造成其他问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,这是上次提交的,我修改一下
|
||
原因是 `qiankun` 将外链样式改成了内联样式,但是字体文件的加载路径是相对路径。 | ||
|
||
修改一下 `webpack` 打包,给字体文件注入路径前缀即可: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
更 prefer 的方式应该是在一定大小以内的都通过 base64 打进去
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kuitos 已经补充了:4kb 以内的字体文件打包成 base64 。看了下 vue-cli4 ,它给的大小限制就是4kb
Checklist
Description of change
补充几个常见问题