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: use rspack #7249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

feat: use rspack #7249

wants to merge 1 commit into from

Conversation

SevereCloud
Copy link
Contributor

@SevereCloud SevereCloud commented Jul 28, 2024

Требования

builtin:swc-loader компилируется со своей версией swc_core, поэтому для поддержки плагинов необходимо чтобы версия rust библиотеки swc_core совпадала в npm пакетах @swc/core, @rspack/core и swc-plugin-*

Что по перфу

git checkout SevereCloud/feat/use-rspack
yarn
cd package/vkui
hyperfine \
  --prepare 'git checkout master && rm -rf node_modules' \
    'yarn postcss:bundle # webpack' \
  --prepare 'git checkout SevereCloud/feat/use-rspack && rm -rf node_modules' \
    'yarn postcss:bundle # rspack'
Benchmark 1: yarn postcss:bundle # webpack
  Time (mean ± σ):      8.634 s ±  0.739 s    [User: 15.548 s, System: 2.244 s]
  Range (min … max):    7.989 s … 10.543 s    10 runs
 
Benchmark 2: yarn postcss:bundle # rspack
  Time (mean ± σ):      5.554 s ±  0.415 s    [User: 9.432 s, System: 1.520 s]
  Range (min … max):    5.144 s …  6.560 s    10 runs
 
Summary
  yarn postcss:bundle # rspack ran
    1.55 ± 0.18 times faster than yarn postcss:bundle # webpack

Что по css

Для минификации используется lightningcss

clean-webpack-plugin

Добавил clean-webpack-plugin для удаления .js.tmp. Размер npm пакета уменьшится на 4~ мегабайта

- -rw-r--r--    1 d.suvorov  staff   2.0M Oct 15 12:29 components.js.tmp
- -rw-r--r--    1 d.suvorov  staff   2.0M Oct 15 12:29 vkui.js.tmp

Release notes

Улучшения

  • css бандл теперь собирается с помощью rspack

Copy link

codesandbox-ci bot commented Jul 28, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

github-actions bot commented Jul 28, 2024

e2e tests

Playwright Report

Copy link
Contributor

github-actions bot commented Jul 28, 2024

👀 Docs deployed

Commit abd6a3a

Copy link

codecov bot commented Jul 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.14%. Comparing base (975878d) to head (abd6a3a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7249   +/-   ##
=======================================
  Coverage   95.14%   95.14%           
=======================================
  Files         384      384           
  Lines       11354    11354           
  Branches     3724     3724           
=======================================
  Hits        10803    10803           
  Misses        551      551           
Flag Coverage Δ
unittests 95.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Jul 29, 2024

size-limit report 📦

Path Size
JS 386.27 KB (0%)
JS (gzip) 116.87 KB (0%)
JS (brotli) 95.97 KB (0%)
JS import Div (tree shaking) 1.46 KB (0%)
CSS 331.83 KB (-0.43% 🔽)
CSS (gzip) 42.06 KB (+0.69% 🔺)
CSS (brotli) 33.15 KB (+0.15% 🔺)

@SevereCloud SevereCloud self-assigned this Jul 29, 2024
@SevereCloud SevereCloud force-pushed the SevereCloud/feat/use-rspack branch 2 times, most recently from 05b8137 to 2a6e0e7 Compare August 5, 2024 07:41
@SevereCloud SevereCloud marked this pull request as ready for review August 5, 2024 07:52
@SevereCloud SevereCloud requested a review from a team as a code owner August 5, 2024 07:52
@SevereCloud SevereCloud added the no-stale Добавляет PR в исключения для автоматического закрытия label Aug 5, 2024
@inomdzhon
Copy link
Contributor

inomdzhon commented Aug 8, 2024

Note

Договорились, что ждём стабильного релиза

@inomdzhon inomdzhon marked this pull request as draft August 20, 2024 09:27
@SevereCloud SevereCloud force-pushed the SevereCloud/feat/use-rspack branch 2 times, most recently from f527aa0 to 8fe4f08 Compare August 28, 2024 07:41
@SevereCloud SevereCloud marked this pull request as ready for review August 28, 2024 07:48
@SevereCloud SevereCloud marked this pull request as draft September 2, 2024 06:48
@SevereCloud SevereCloud marked this pull request as ready for review October 15, 2024 09:33
@SevereCloud SevereCloud added this to the v7.0.0 milestone Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-stale Добавляет PR в исключения для автоматического закрытия research
Projects
Status: 👀 In Review
Development

Successfully merging this pull request may close these issues.

2 participants