Skip to content

chore(esbuild): dedupe esbuild config#9875

Merged
Tobbe merged 4 commits intomainfrom
ds-jgmw-tech-debt/deduplicate-esbuild
Jan 24, 2024
Merged

chore(esbuild): dedupe esbuild config#9875
Tobbe merged 4 commits intomainfrom
ds-jgmw-tech-debt/deduplicate-esbuild

Conversation

@jtoar
Copy link
Contributor

@jtoar jtoar commented Jan 23, 2024

This PR cleans up duplicated esbuild config.

Any package using esbuild to build can import build from buildDefaults.mjs in the root of the framework and call it which should more often than not just work. It builds all source files the way babel currently does. It doesn't do any bundling or polyfilling or anything fancy by default. It can take a few options though to do fancy things. See these examples here for packages that are bundled and have dual exports:

The goal here was to start cleaning up tech debt and duplicated code before it gets out of hand. I'm sure more patterns will arise or better ways of doing this as we migrate more packages away from Babel and to ESM.

I tested by checking in the dist from main by removing the dist line in the .gitignore and compared all of the changes against that.

@jtoar jtoar added the release:chore This PR is a chore (means nothing for users) label Jan 23, 2024
@jtoar jtoar added this to the chore milestone Jan 23, 2024
@jtoar jtoar requested a review from Tobbe January 23, 2024 16:29
Comment on lines -22 to -26
"jest": {
"testPathIgnorePatterns": [
"/dist/"
]
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed these Jest related config options here and in a few other places in the spirit of cleaning up because they weren't being used

Copy link
Contributor Author

@jtoar jtoar Jan 23, 2024

Choose a reason for hiding this comment

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

This wasn't being used; this package wasn't built by babel nor was it using Jest. I did this everywhere else I could

@Tobbe Tobbe merged commit f1cdb71 into main Jan 24, 2024
@Tobbe Tobbe deleted the ds-jgmw-tech-debt/deduplicate-esbuild branch January 24, 2024 19:15
dac09 added a commit to dac09/redwood that referenced this pull request Jan 25, 2024
…dleware

* 'main' of github.com:redwoodjs/redwood:
  chore(structure): switch to vitest (redwoodjs#9878)
  chore(cli): switch to vitest (redwoodjs#9863)
  feat(dbAuth): Refactor dbAuthHandler to support WebAPI Request events (redwoodjs#9835)
  fix(crwa): remove yarn-install option for yarn 1 (redwoodjs#9881)
  chore(esbuild): dedupe esbuild config (redwoodjs#9875)
  chore(esm): convert `@redwoodjs/cli-helpers` to ESM (redwoodjs#9872)
  fix(studio): Add version checks when first running Studio (redwoodjs#9876)
@Josh-Walker-GM Josh-Walker-GM modified the milestones: chore, v8.0.0 Sep 4, 2024
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.

3 participants