Skip to main content
Bun natively supports .json5 imports.
config.json5

Import the file like any other source file.
config.ts

You can also use named imports to destructure top-level properties:
config.ts

For parsing JSON5 strings at runtime, use Bun.JSON5.parse():
config.ts

See JSON5 for the rest of Bun’s JSON5 support.