Skip to content

Commit

Permalink
Use mutations
Browse files Browse the repository at this point in the history
  • Loading branch information
colinhacks committed Aug 7, 2023
1 parent aca255e commit 1c16913
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/create-vite/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,14 +433,11 @@ async function init() {
// the --bun flag is required to override the node shebang
// after Bun 1.0 this will no longer be necessary
if (pkg.scripts) {
pkg.scripts = {
...pkg.scripts,
dev: pkg.scripts.dev?.replace('vite', 'bunx --bun vite'),
build: pkg.scripts.build?.replace(
'vite build',
'bunx --bun vite build',
),
}
pkg.scripts.dev = pkg.scripts.dev?.replace('vite', 'bunx --bun vite')
pkg.scripts.build = pkg.scripts.build?.replace(
'vite build',
'bunx --bun vite build',
)
}
}

Expand Down

0 comments on commit 1c16913

Please sign in to comment.