-
Notifications
You must be signed in to change notification settings - Fork 995
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(esbuild): dedupe esbuild config #9875
Conversation
"jest": { | ||
"testPathIgnorePatterns": [ | ||
"/dist/" | ||
] | ||
}, |
There was a problem hiding this comment.
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
packages/context/.babelrc.js
Outdated
There was a problem hiding this comment.
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
…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)
This PR cleans up duplicated esbuild config.
Any package using esbuild to build can import
build
frombuildDefaults.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.