Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] CLI init command does not accept devUrl null #9181

Closed
gronke opened this issue Mar 13, 2024 · 1 comment · Fixed by #9183
Closed

[docs] CLI init command does not accept devUrl null #9181

gronke opened this issue Mar 13, 2024 · 1 comment · Fixed by #9183
Labels
type: documentation Need to update the API documentation

Comments

@gronke
Copy link

gronke commented Mar 13, 2024

Documentation states the devUrl can be null, although Tauri CLI does not allow setting none.

devUrl
string | null formatted as uri

The URL to load in development.

This is usually an URL to a dev server, which serves your application assets with hot-reload and HMR. Most modern JavaScript bundlers like vite provides a way to start a dev server by default.

If you don’t have a dev server or don’t want to use one, ignore this option and use frontendDist and point to a web assets directory, and Tauri CLI will run its built-in dev server and provide a simple hot-reload experience.

Undefined --dev-url is recognized as none, but not applied as such:

% cargo tauri init --dev-url -D ../src -A tst --before-dev-command "" --before-build-command "" -W Test  
error: a value is required for '--dev-url <DEV_URL>' but none was supplied

For more information, try '--help'.

Init without --dev-url prompts for the dev server URL:

% cargo tauri init -D ../src -A tst --before-dev-command "" --before-build-command "" -W Test  
? What is the url of your dev server? › 

Therefore it is not possible to provision a repository without any dev server.

% cargo tauri --version
tauri-cli 2.0.0-beta.9
@gronke
Copy link
Author

gronke commented Mar 22, 2024

Tested on the latest v2 branch. Works like a charm, thank you 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation Need to update the API documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant