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

doc: add some frequently questions to the FAQ #948

Merged
merged 12 commits into from
Oct 9, 2020
Merged

doc: add some frequently questions to the FAQ #948

merged 12 commits into from
Oct 9, 2020

Conversation

gongshun
Copy link
Collaborator

Checklist

  • documentation is changed or added
Description of change

补充几个常见问题

Copy link
Member

@kuitos kuitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit 有点问题,rebase 一下到 master 分支吧

@@ -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 />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

script 标签不是自闭和的

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PeachScript 这个问题知道不

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

升到 beta 就好了 #974

- 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/`。
Copy link
Member

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 描述的用户可能会选择无脑加,最后造成其他问题

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,这是上次提交的,我修改一下


原因是 `qiankun` 将外链样式改成了内联样式,但是字体文件的加载路径是相对路径。

修改一下 `webpack` 打包,给字体文件注入路径前缀即可:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

更 prefer 的方式应该是在一定大小以内的都通过 base64 打进去

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,我补充一下。另外,给官网设计个 icon 呗。
image

Copy link
Collaborator Author

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

@kuitos kuitos merged commit cb0d83d into master Oct 9, 2020
@kuitos kuitos deleted the fix/doc branch October 9, 2020 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants