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

refactor(cli): enable lazy swc bundling #27061

Merged
merged 3 commits into from
Feb 12, 2024
Merged

Conversation

byCedric
Copy link
Member

@byCedric byCedric commented Feb 12, 2024

Why

This should boost startup performance a bit. Tested with bun create expo ./test --template tabs.

1: expo export --platform web(75-100ms improvement)

image

Top test is with lazy: true, bottom with lazy: undefined (false)

2: expo export -p ios --no-bytecode --no-minify --max-workers=0 --clear --dev(±300ms improvement)

image

Top test is with lazy: true, bottom with lazy: undefined (false)

How

See hyperfine screenshots above

Other tests

  • Changing Node target to 18+, adds back 100ms to export performance to test 2
  • Disabling module interop, not possible as we use both CJS and ESM mixed
Node target 18+

image

Test Plan

See tests

Checklist

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Feb 12, 2024
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Feb 12, 2024
Copy link
Contributor

@EvanBacon EvanBacon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If tests pass then this lgtm. Nice work here

@byCedric byCedric merged commit e4df914 into main Feb 12, 2024
6 checks passed
@byCedric byCedric deleted the @bycedric/cli/lazy-bundling branch February 12, 2024 20:13
@byCedric
Copy link
Member Author

Relevant tests passed, with an exception for the updates e2e on EAS. But that has nothing to do with the CLI 😄

@brentvatne brentvatne added the published Changes from the PR have been published to npm label Apr 18, 2024
Kudo added a commit that referenced this pull request Apr 19, 2024
# Why

fixing an error `TypeError: osascript(...) is not a function` when
pressing "j" to launch js debugger
this is a regression from #27061 and actually a bug from swc

# How

upgrade swc fixed the problem, maybe a relevant fix is
swc-project/swc@0a7ca2f?

it's near release stage and i don't want to upgrade swc 1.4. let's stick on 1.2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants