Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

feat: support crossorigin #649

Merged
merged 7 commits into from
Nov 4, 2022
Merged

feat: support crossorigin #649

merged 7 commits into from
Nov 4, 2022

Conversation

chenjun1011
Copy link
Contributor

支持透传 crossorigin

异步加载的 chunk 也需要开启 crossorigin,才能让 JSTracker 捕获 JS Error 的具体信息

https://webpack.js.org/configuration/output/#outputcrossoriginloading

@vercel
Copy link

vercel bot commented Nov 1, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ice-v3 ✅ Ready (Inspect) Visit Preview Nov 4, 2022 at 3:38AM (UTC)

@luhc228
Copy link
Member

luhc228 commented Nov 1, 2022

可以补充一下文档

@wssgcg1213
Copy link
Collaborator

同步一下文档

wssgcg1213
wssgcg1213 previously approved these changes Nov 2, 2022
import { defineConfig } from '@ice/app';

export default defineConfig({
define: {
Copy link
Member

Choose a reason for hiding this comment

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

crossOriginLoading 为什么是在 define 对象里面?跟上面的类型定义不一致

Copy link
Collaborator

Choose a reason for hiding this comment

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

诶 是不是typo?

});
```

指定 webpack 启用 cross-origin 去加载 chunk.
Copy link
Member

Choose a reason for hiding this comment

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

- 指定 webpack 启用 cross-origin 去加载 chunk.
+ 指定 webpack 启用 [cross-origin](https://webpack.js.org/configuration/output/#outputcrossoriginloading) 去加载 chunk。

好处是可以通过链接跳过让用户知道 crossOriginLoading 每个参数的含义是什么?

luhc228
luhc228 previously approved these changes Nov 4, 2022
ClarkXia
ClarkXia previously approved these changes Nov 4, 2022
@chenjun1011 chenjun1011 changed the base branch from master to release-next November 4, 2022 03:33
@chenjun1011 chenjun1011 dismissed stale reviews from ClarkXia and luhc228 November 4, 2022 03:33

The base branch was changed.

@ClarkXia ClarkXia merged commit c2d1d02 into release-next Nov 4, 2022
@ClarkXia ClarkXia deleted the feat-crossorigin branch November 4, 2022 06:39
@ClarkXia ClarkXia mentioned this pull request Nov 7, 2022
15 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants