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

feat: support webpack 5 #6172

Merged
merged 6 commits into from
Feb 26, 2021
Merged

feat: support webpack 5 #6172

merged 6 commits into from
Feb 26, 2021

Conversation

sorrycc
Copy link
Member

@sorrycc sorrycc commented Feb 24, 2021

Checklist
  • npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change
  • Support webpack 5 via webpack5 config
  • Support lazy compilation
  • Support fs cache
  • Add node polyfill with node-libs-browser

@codecov
Copy link

codecov bot commented Feb 24, 2021

Codecov Report

Merging #6172 (47fcb3a) into master (6cd86cd) will decrease coverage by 0.50%.
The diff coverage is 37.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6172      +/-   ##
==========================================
- Coverage   85.71%   85.20%   -0.51%     
==========================================
  Files         151      152       +1     
  Lines        3394     3427      +33     
  Branches      912      923      +11     
==========================================
+ Hits         2909     2920      +11     
- Misses        475      497      +22     
  Partials       10       10              
Impacted Files Coverage Δ
packages/preset-built-in/src/index.ts 100.00% <ø> (ø)
...s/preset-built-in/src/plugins/features/webpack5.ts 26.08% <26.08%> (ø)
...ackages/bundler-webpack/src/getConfig/getConfig.ts 84.81% <54.54%> (-2.36%) ⬇️
packages/bundler-webpack/src/index.ts 36.66% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d13d55...47fcb3a. Read the comment docs.

@sorrycc sorrycc merged commit 0b38675 into master Feb 26, 2021
@delete-merged-branch delete-merged-branch bot deleted the feat/support-webpack-5 branch February 26, 2021 07:32
@LeoHuiyi
Copy link
Contributor

LeoHuiyi commented Mar 1, 2021

@sorrycc 大佬 use @umijs/deps预编译后,webpack5能
image这样引用吗?如果不能引用,要如何解决呢?

@sorrycc
Copy link
Member Author

sorrycc commented Mar 4, 2021

@LeoHuiyi 这个文档是不是过时了,没有 OverridablesPlugin 这个文件了,其他 container 下的可以通过 webpack.container.xxx 引用到,参考 https://unpkg.com/browse/webpack@5.24.3/lib/index.jshttps://unpkg.com/browse/webpack@5.24.3/lib/container/

@sorrycc
Copy link
Member Author

sorrycc commented Mar 4, 2021

然后如果有没有被 webpack 导出但是需要引用的文件,也可以提 FEATURE,我们往 webpack 上加就好了。

@LeoHuiyi
Copy link
Contributor

LeoHuiyi commented Mar 5, 2021

@sorrycc 明白,虽然这样 deps版本确定了,预编译 加载会更快。但是 很多包都改了源码,会有风险吗?基础库版本和社区同步会及时吗?感觉维护成本蛮大的。

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.

2 participants