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

chore(project-config): reduce package size by removing Babel deps #8139

Merged
merged 4 commits into from
May 8, 2023

Conversation

jtoar
Copy link
Contributor

@jtoar jtoar commented Apr 26, 2023

While pairing with @Josh-Walker-GM, he mentioned that @redwoodjs/project-config is ~3.2 MB, which seems bloated for a package that only contains a few functions. @babel/runtime-corejs3 and core-js alone comprise ~2.25 MB. So we could 1/3rd the size of this package by removing those, which entails swapping babel for esbuild like we tried in #8074.

Note that we have to leave the .babelrc.js file around for jest tests to work.

@jtoar jtoar added the release:chore This PR is a chore (means nothing for users) label Apr 26, 2023
@jtoar jtoar marked this pull request as ready for review May 8, 2023 16:40
Copy link
Collaborator

@Josh-Walker-GM Josh-Walker-GM left a comment

Choose a reason for hiding this comment

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

Probably a bit early but we could in the future add a default build options in the framework root. As a way to stay consistent with logLevel, platform etc.

@jtoar jtoar merged commit 9e4df98 into main May 8, 2023
@jtoar jtoar deleted the ds-project-config/rm-babel branch May 8, 2023 17:28
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone May 8, 2023
@jtoar
Copy link
Contributor Author

jtoar commented May 8, 2023

@Josh-Walker-GM yeah if more packages end up building this way in the future I wouldn't mind

jtoar added a commit that referenced this pull request May 9, 2023
)

* chore: reduce project-config size by removing babel deps

* reorganize build file

* add logging
@jtoar jtoar modified the milestones: next-release, v5.1.0 May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:chore This PR is a chore (means nothing for users)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants