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

Merged
merged 1 commit into from
Oct 22, 2024
Merged

feat: use rspack #7249

merged 1 commit into from
Oct 22, 2024

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 f1f9d47

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 (1d408a5) to head (f1f9d47).
Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7249   +/-   ##
=======================================
  Coverage   95.14%   95.14%           
=======================================
  Files         384      384           
  Lines       11357    11357           
  Branches     3727     3727           
=======================================
  Hits        10806    10806           
  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.

@SevereCloud SevereCloud force-pushed the SevereCloud/feat/use-rspack branch from 6bfb0d0 to 2af6504 Compare July 29, 2024 06:58
Copy link
Contributor

github-actions bot commented Jul 29, 2024

size-limit report 📦

Path Size
JS 386.65 KB (0%)
JS (gzip) 116.88 KB (0%)
JS (brotli) 96 KB (0%)
JS import Div (tree shaking) 1.46 KB (0%)
CSS 332.39 KB (-0.41% 🔽)
CSS (gzip) 42.1 KB (+0.68% 🔺)
CSS (brotli) 33.25 KB (+0.39% 🔺)

@SevereCloud SevereCloud force-pushed the SevereCloud/feat/use-rspack branch from 2af6504 to 0cfa77b Compare July 29, 2024 08:27
@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
@SevereCloud SevereCloud force-pushed the SevereCloud/feat/use-rspack branch from 2a6e0e7 to 1cded00 Compare August 6, 2024 12:33
@inomdzhon
Copy link
Contributor

inomdzhon commented Aug 8, 2024

Note

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

@SevereCloud SevereCloud force-pushed the SevereCloud/feat/use-rspack branch from 1cded00 to 828ed3a Compare August 15, 2024 14:36
@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 force-pushed the SevereCloud/feat/use-rspack branch from 8fe4f08 to 71d37ef Compare September 11, 2024 12:21
@SevereCloud SevereCloud force-pushed the SevereCloud/feat/use-rspack branch 2 times, most recently from feb5571 to abd6a3a Compare October 15, 2024 09:06
@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
@SevereCloud SevereCloud force-pushed the SevereCloud/feat/use-rspack branch from abd6a3a to d53a051 Compare October 21, 2024 12:11
inomdzhon
inomdzhon previously approved these changes Oct 21, 2024
@inomdzhon
Copy link
Contributor

Конфликтик(

@inomdzhon inomdzhon modified the milestones: v7.0.0, v7.0.0-beta.1 Oct 22, 2024
@SevereCloud SevereCloud merged commit 43a6605 into master Oct 22, 2024
28 checks passed
@SevereCloud SevereCloud deleted the SevereCloud/feat/use-rspack branch October 22, 2024 11:32
@vkcom-publisher
Copy link
Contributor

v7.0.0-beta.1 🎉

@inomdzhon inomdzhon modified the milestones: v7.0.0-beta.1, v7.0.0 Dec 2, 2024
@vkcom-publisher
Copy link
Contributor

v7.0.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-stale Добавляет PR в исключения для автоматического закрытия research
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants