Skip to content

Commit 3c21ddc

Browse files
fix(cta): use correct beforeDevCommand for vite recipe (#1931)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
1 parent 1341ca9 commit 3c21ddc

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

.changes/cta-vite-before-dev.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-tauri-app": patch
3+
---
4+
5+
Fixes the `beforeDevCommand` on vite recipe.

tooling/create-tauri-app/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ const runInit = async (argv: Argv): Promise<void> => {
339339
packageManager
340340
})
341341

342-
logStep('Adding `tauri` script to package.json')
342+
logStep(`Adding ${reset(yellow('"tauri"'))} script to package.json`)
343343
addTauriScript(appDirectory)
344344

345345
logStep(`Running: ${reset(yellow('tauri init'))}`)
@@ -352,7 +352,7 @@ const runInit = async (argv: Argv): Promise<void> => {
352352
cwd: appDirectory
353353
})
354354

355-
logStep('Updating `tauri.conf.json`')
355+
logStep(`Updating ${reset(yellow('"tauri.conf.json"'))}`)
356356
updateTauriConf(appDirectory, cfg)
357357
}
358358

tooling/create-tauri-app/src/recipes/vite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const vite: Recipe = {
3434
...cfg,
3535
distDir: `../dist`,
3636
devPath: 'http://localhost:3000',
37-
beforeDevCommand: `${packageManager === 'yarn' ? 'yarn' : 'npm run'} start`,
37+
beforeDevCommand: `${packageManager === 'yarn' ? 'yarn' : 'npm run'} dev`,
3838
beforeBuildCommand: `${
3939
packageManager === 'yarn' ? 'yarn' : 'npm run'
4040
} build`

0 commit comments

Comments
 (0)