{"tool":"bun","tool_display":"Bun","intent":"bundle-with-external-dependencies","intent_display":"bundle with external dependencies","title":"Bun Command: bundle with external dependencies","command_string":"bun build <path/to/entry.ts> --outfile <path/to/output.js> -e <react react-dom>","raw_command_string":"bun build {{path/to/entry.ts}} --outfile {{path/to/output.js}} {{[-e|--external]}} {{react react-dom}}","description":"Exact CLI syntax to bundle with external dependencies using Bun.","usage_scenario":"When integrating third-party libraries that should not be bundled into the final artifact for smaller output sizes.","scenario_context":"Ensure external dependencies are excluded to reduce bundle size effectively.","simulated_output":"Build started...\nBundling /path/to/entry.ts with external dependencies:\n  - react\n  - react-dom\nOutput file created at /path/to/output.js\nBuild completed successfully!","how_to_steps":["Run the command: bun build /path/to/entry.ts --outfile /path/to/output.js --external react react-dom","Check the output file at /path/to/output.js to verify the bundling was successful."],"inferred_category":"Package Management","canonical_url":"https://www.syntaxstandard.com/bun/bundle-with-external-dependencies"}