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

Move swcMinify out of experimental #29810

Merged
merged 18 commits into from
Oct 25, 2021

Conversation

timneutkens
Copy link
Member

@timneutkens timneutkens commented Oct 11, 2021

  • Move swcMinify to the top level of next.config.js
  • Added test for swcMinify enabled
  • Remove swcLoader option as it's stable now, apps with .babelrc opt-out automatically

Bug

  • Related issues linked using fixes #number
  • Integration tests added
  • Errors have helpful link attached, see contributing.md

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added
  • Telemetry added. In case of a feature if it's used or not.
  • Errors have helpful link attached, see contributing.md

Documentation / Examples

  • Make sure the linting passes

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

styfle
styfle previously approved these changes Oct 13, 2021
@timneutkens timneutkens marked this pull request as draft October 13, 2021 18:39
@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@timneutkens timneutkens marked this pull request as ready for review October 25, 2021 06:50
@timneutkens timneutkens changed the title Test enabling swcMinify Move swcMinify out of experimental Oct 25, 2021
@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk
Copy link
Member

ijjk commented Oct 25, 2021

Stats from current PR

Default Build (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
buildDuration 23.4s 23.6s ⚠️ +177ms
buildDurationCached 4.4s 4.4s ⚠️ +43ms
nodeModulesSize 196 MB 196 MB ⚠️ +471 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
/ failed reqs 0 0
/ total time (seconds) 3.897 4.037 ⚠️ +0.14
/ avg req/sec 641.59 619.33 ⚠️ -22.26
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 2.015 2.217 ⚠️ +0.2
/error-in-render avg req/sec 1240.81 1127.87 ⚠️ -112.94
Client Bundles (main, webpack, commons)
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
450.HASH.js gzip 179 B 179 B
framework-HASH.js gzip 42.2 kB 42.2 kB
main-HASH.js gzip 27.7 kB 27.7 kB
webpack-HASH.js gzip 1.45 kB 1.45 kB
Overall change 71.5 kB 71.5 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
polyfills-a4..dd70.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
_app-HASH.js gzip 1.23 kB 1.23 kB
_error-HASH.js gzip 194 B 194 B
amp-HASH.js gzip 312 B 312 B
css-HASH.js gzip 327 B 327 B
dynamic-HASH.js gzip 2.38 kB 2.38 kB
head-HASH.js gzip 350 B 350 B
hooks-HASH.js gzip 635 B 635 B
image-HASH.js gzip 4.44 kB 4.44 kB
index-HASH.js gzip 263 B 263 B
link-HASH.js gzip 1.87 kB 1.87 kB
routerDirect..HASH.js gzip 321 B 321 B
script-HASH.js gzip 383 B 383 B
withRouter-HASH.js gzip 318 B 318 B
334f979574ae..6f4.css gzip 106 B 106 B
Overall change 13.1 kB 13.1 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
_buildManifest.js gzip 459 B 459 B
Overall change 459 B 459 B
Rendered Page Sizes
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
index.html gzip 534 B 534 B
link.html gzip 546 B 546 B
withRouter.html gzip 528 B 528 B
Overall change 1.61 kB 1.61 kB

Default Build with SWC (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
buildDuration 21.4s 19.1s -2.3s
buildDurationCached 4.6s 4.2s -414ms
nodeModulesSize 196 MB 196 MB ⚠️ +471 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
/ failed reqs 0 0
/ total time (seconds) 3.799 4.213 ⚠️ +0.41
/ avg req/sec 658.15 593.38 ⚠️ -64.77
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 2.062 2.241 ⚠️ +0.18
/error-in-render avg req/sec 1212.46 1115.68 ⚠️ -96.78
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
450.HASH.js gzip 179 B 179 B
framework-HASH.js gzip 42.2 kB 42.2 kB ⚠️ +7 B
main-HASH.js gzip 27.7 kB 27.8 kB ⚠️ +123 B
webpack-HASH.js gzip 1.45 kB 1.43 kB -16 B
Overall change 71.5 kB 71.6 kB ⚠️ +114 B
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
polyfills-a4..dd70.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages Overall decrease ✓
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
_app-HASH.js gzip 1.23 kB 1.22 kB -14 B
_error-HASH.js gzip 194 B 180 B -14 B
amp-HASH.js gzip 312 B 305 B -7 B
css-HASH.js gzip 327 B 321 B -6 B
dynamic-HASH.js gzip 2.38 kB 2.38 kB -4 B
head-HASH.js gzip 350 B 342 B -8 B
hooks-HASH.js gzip 635 B 621 B -14 B
image-HASH.js gzip 4.44 kB 4.46 kB ⚠️ +15 B
index-HASH.js gzip 263 B 256 B -7 B
link-HASH.js gzip 1.87 kB 1.9 kB ⚠️ +32 B
routerDirect..HASH.js gzip 321 B 314 B -7 B
script-HASH.js gzip 383 B 375 B -8 B
withRouter-HASH.js gzip 318 B 309 B -9 B
334f979574ae..6f4.css gzip 106 B 106 B
Overall change 13.1 kB 13.1 kB -51 B
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
_buildManifest.js gzip 459 B 459 B
Overall change 459 B 459 B
Rendered Page Sizes
vercel/next.js canary timneutkens/next.js add/test-enable-swcminify Change
index.html gzip 534 B 534 B
link.html gzip 546 B 547 B ⚠️ +1 B
withRouter.html gzip 528 B 527 B -1 B
Overall change 1.61 kB 1.61 kB
Commit: 7666394

@ijjk
Copy link
Member

ijjk commented Oct 25, 2021

Failing test suites

Commit: 7666394

test/integration/production-swcminify/test/index.test.js

  • Production Usage > With basic usage > should polyfill Node.js modules
Expand output

● Production Usage › With basic usage › should polyfill Node.js modules

expect(received).toBe(expected) // Object.is equality

Expected: "a07a23e124ae01399e287505c2f7b2e69006540de08562de5ddd01fc7bbef3a5"
Received: "782754f900000000000000000000000000000000000000000000000000000000"

  272 |
  273 |       expect(parsedData.vm).toBe(105)
> 274 |       expect(parsedData.hash).toBe(
      |                               ^
  275 |         'a07a23e124ae01399e287505c2f7b2e69006540de08562de5ddd01fc7bbef3a5'
  276 |       )
  277 |       expect(parsedData.path).toBe('/hello/world/test.txt')

  at Object.<anonymous> (integration/production-swcminify/test/index.test.js:274:31)

@timneutkens timneutkens merged commit bc3ab3c into vercel:canary Oct 25, 2021
@timneutkens timneutkens deleted the add/test-enable-swcminify branch October 25, 2021 11:49
@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants