Applies to "_.ts, _.tsx, _.html, _.css, _.js, _.jsx, package.json files
Default to using Bun instead of Node.js.
- Use
bun <file>instead ofnode <file>orts-node <file> - Use
bun testinstead ofjestorvitest - Use
bun build <file.html|file.ts|file.css>instead ofwebpackoresbuild - Use
bun installinstead ofnpm installoryarn installorpnpm install - Use
bun run <script>instead ofnpm run <script>oryarn run <script>orpnpm run <script> - Bun automatically loads .env, so don't use dotenv.
For more information, read the OpenCode Plugin API docs at https://opencode.ai/docs/plugins/
Use bun test to run tests.
import { test, expect } from "bun:test";
test("hello world", () => {
expect(1).toBe(1);
});For more information, read the Bun API docs in node_modules/bun-types/docs/**.md.