mirror of
https://github.com/codeaashu/claude-code.git
synced 2026-04-08 22:28:48 +03:00
claude-code
This commit is contained in:
18
scripts/bun-plugin-shims.ts
Normal file
18
scripts/bun-plugin-shims.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
// scripts/bun-plugin-shims.ts
|
||||
// Bun preload plugin — intercepts `bun:bundle` imports at runtime
|
||||
// and resolves them to our local shim so the CLI can run without
|
||||
// the production Bun bundler pass.
|
||||
|
||||
import { plugin } from 'bun'
|
||||
import { resolve } from 'path'
|
||||
|
||||
plugin({
|
||||
name: 'bun-bundle-shim',
|
||||
setup(build) {
|
||||
const shimPath = resolve(import.meta.dir, '../src/shims/bun-bundle.ts')
|
||||
|
||||
build.onResolve({ filter: /^bun:bundle$/ }, () => ({
|
||||
path: shimPath,
|
||||
}))
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user