--use <framework> | Choose a framework, e.g. "--use next". It checks first for a package named "bun-framework-packagename" and then "packagename" |
--bunfile <path> | Use a .bun file (default: node_modules.bun) |
--server-bunfile <path> | Use a .server.bun file (default: node_modules.server.bun) |
--cwd <path> | Absolute path to resolve files & entry points from. This just changes the process' cwd |
-c, --config [path] | Config file to load bun from (e.g. -c bunfig.toml |
--disable-react-fast-refresh | Disable React Fast Refresh |
--disable-hmr | Disable Hot Module Reloading (disables fast refresh too) |
--extension-order <order...> | Defaults to: .tsx,.ts,.jsx,.js,.json |
--jsx-factory <name> | Changes the function called when compiling JSX elements using the classic JSX runtime |
--jsx-fragment <name> | Changes the function called when compiling JSX fragments |
--jsx-import-source <module> | Declares the module specifier to be used for importing the jsx and jsxs factory functions. Default: "react" |
--jsx-production | Use jsx instead of jsxDEV (default) for the automatic runtime |
--jsx-runtime <name> | "automatic" (default) or "classic" |
--main-fields <fields...> | Main fields to lookup in package.json. Defaults to --platform dependent |
--no-summary | Don't print a summary (when generating .bun) |
-v, --version | Print version and exit |
--platform <name> | "browser" or "node". Defaults to "browser" |
--public-dir <path> | Top-level directory for .html files, fonts or anything external. Defaults to "<cwd>/public", to match create-react-app and Next.js |
--tsconfig-override <path> | Load tsconfig from path instead of cwd/tsconfig.json |
-d, --define <k:v...> | Substitute K:V while parsing, e.g. --define process.env.NODE_ENV:"development". Values are parsed as JSON |
-e, --external <module...> | Exclude module from transpilation (can use * wildcards). ex: -e react |
-h, --help | Display this help and exit |
-i, --inject <module...> | Inject module at the top of every file |
-l, --loader <loader...> | Parse files with .ext:loader, e.g. --loader .js:jsx. Valid loaders: jsx, js, json, tsx, ts, css |
-u, --origin <url> | Rewrite import URLs to start with --origin. Default: "" |
-p, --port <port> | Port to serve bun's dev server on. Default: "3000" |
--silent | Don't repeat the command for bun run |