Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Includes many changes for this to work
Package manager replacement
package-lock.json
and addbun.lockb
after installingbun
given it's a binary filenpm
. Or insteadts-node
(which usesnode
runtime). Prefix them withbun:
so we can keep NPM / Node ones for some time in case we regret somethingScripting
Many changes, that include improvements to previous setup despite setting up Bun along the way
ts
extensions by addingallowImportingTsExtensions
totsconfig.json
allowSyntheticDefaultImports
to avoid confusing magic to happen. If it's a default one, import it as it. Otherwise, don't.ts-node
config to import app files as ESM files. This allows us to mark those files as ESM without addingmts
extension ortype: module
to package.json (that we can't as doing so makes the SSR tasks fail). Therefore the exports are as expected: what you export (withexport
) is what you can laterimport
. Otherwise, Node.js for compatibility would add a non-existing default import. And then the imports got weirddefault
import, then we can run scripts withbun
, yay! 🥳--experimental-specifier-resolution=node
to Node run args when runningts-node
. Otherwise, we would have to add.ts
extensions when importing there. Which is a bit uglier.bun
. But not withnode
, as requires the extension as per ES modules requirements.CI/CD
.ci/Makefile
to use new bun run scripts and usebunx
to run LighthouseWins