Skip to content

Commit

Permalink
feat: update doc about webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
Rain120 committed Sep 10, 2024
1 parent a33c0d7 commit 130dc14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

packages:
- 'packages/**'
- 'dev/**'
Expand Down
3 changes: 2 additions & 1 deletion website/src/components/config/_webpackConfig.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ module.exports = {
3. 如果你的 webpack 为 v4 版本,需要设置 jsonpFunction 并保证该值唯一(否则可能出现 webpack chunk 互相影响的可能)。若为 webpack5 将会直接使用 package.json name 作为唯一值,请确保应用间的 name 各不相同;
4. publicPath 设置为子应用资源的绝对地址,避免由于子应用的相对资源导致资源变为了主应用上的相对资源。这是因为主、子应用处于同一个文档流中,相对路径是相对于主应用而言的
5. 'Access-Control-Allow-Origin': '\*' 允许开发环境跨域,保证子应用的资源支持跨域。另外也需要保证在上线后子应用的资源在主应用的环境中加载不会存在跨域问题(**也需要限制范围注意安全问题**);
:::

:::

0 comments on commit 130dc14

Please sign in to comment.