diff --git a/v2/cmd/wails/internal/commands/dev/dev.go b/v2/cmd/wails/internal/commands/dev/dev.go index c8d23f5ec..77b7b36a6 100644 --- a/v2/cmd/wails/internal/commands/dev/dev.go +++ b/v2/cmd/wails/internal/commands/dev/dev.go @@ -325,6 +325,7 @@ func loadAndMergeProjectConfig(cwd string, flags *devFlags) (*project.Project, e if flags.reloadDirs != projectConfig.ReloadDirectories { projectConfig.ReloadDirectories = filepath.ToSlash(flags.reloadDirs) + shouldSaveConfig = true } if flags.devServerURL == defaultDevServerURL && projectConfig.DevServerURL != defaultDevServerURL && projectConfig.DevServerURL != "" { diff --git a/website/docs/reference/cli.mdx b/website/docs/reference/cli.mdx index 4c0cc6c95..551e671c5 100644 --- a/website/docs/reference/cli.mdx +++ b/website/docs/reference/cli.mdx @@ -146,7 +146,7 @@ Your system is ready for Wails development! | -appargs "args" | Arguments passed to the application in shell style | | | -platform "platform" | Platform/Arch to target | `runtime.GOOS` | -If the `assetdir`, `wailsjsdir`, `debounce` or `devserverurl` flags are provided on the command line, they are saved in +If the `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce` or `devserverurl` flags are provided on the command line, they are saved in `wails.json`, and become the defaults for subsequent invocations. Example: diff --git a/website/docs/reference/project-config.mdx b/website/docs/reference/project-config.mdx index e74a571af..c3b624274 100644 --- a/website/docs/reference/project-config.mdx +++ b/website/docs/reference/project-config.mdx @@ -26,5 +26,5 @@ The project config resides in the `wails.json` file in the project directory. Th This file is read by the Wails CLI when running `wails build` or `wails dev`. -The `assetdir`, `wailsjsdir`, `debounceMS` and `devserverurl` flags in `wails build/dev` will update the project config +The `assetdir`, `reloaddirs`, `wailsjsdir`, `debounceMS` and `devserverurl` flags in `wails build/dev` will update the project config and thus become defaults for subsequent runs. \ No newline at end of file