diff --git a/website/docs/guides/application-development.mdx b/website/docs/guides/application-development.mdx index 46f088597..f96496145 100644 --- a/website/docs/guides/application-development.mdx +++ b/website/docs/guides/application-development.mdx @@ -165,7 +165,7 @@ If these 2 keys aren't given, then Wails does absolutely nothing with the fronte Running `wails dev` will start the built in dev server which will start a file watcher in your project directory. By default, if any file changes, wails checks if it was an application file (default: `.go`, configurable with `-e` flag). -If it was, then it will rebuild your application and relaunch it. If the changed file was in the `assetdir` directory, +If it was, then it will rebuild your application and relaunch it. If the changed file was in the assets, it will issue a reload after a short amount of time. The dev server uses a technique called "debouncing" which means it doesn't reload straight away, diff --git a/website/docs/guides/ides.mdx b/website/docs/guides/ides.mdx index fda70ebf6..5e47152b3 100644 --- a/website/docs/guides/ides.mdx +++ b/website/docs/guides/ides.mdx @@ -46,8 +46,7 @@ The 2 files generated are `tasks.json` and `launch.json`. Below are the files ge "program": "${workspaceFolder}/build/bin/myproject.exe", "preLaunchTask": "build", "cwd": "${workspaceFolder}", - "env": {}, - "args": ["-assetdir", "frontend/src"] + "env": {} }, ] } diff --git a/website/docs/guides/migrating.mdx b/website/docs/guides/migrating.mdx index bafc26ac5..921a65929 100644 --- a/website/docs/guides/migrating.mdx +++ b/website/docs/guides/migrating.mdx @@ -199,7 +199,8 @@ The format of the file is slightly different. Here is a comparison: | frontend / serve | | Removed | | tags | | Removed | | | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode | +| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | +| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. This is only needed for some more advanced asset configurations. |

diff --git a/website/docs/howdoesitwork.mdx b/website/docs/howdoesitwork.mdx index 6b8b368a6..aadaf3139 100644 --- a/website/docs/howdoesitwork.mdx +++ b/website/docs/howdoesitwork.mdx @@ -106,9 +106,7 @@ As production binaries use the files contained in `embed.FS`, there are no exter the application. When running in development mode using the `wails dev` command, the assets are loaded off disk, and any changes result -in a "live reload". The location of the assets needs to be passed to the `wails dev` command using the `-assetdir` flag -and is likely to be the same as the embed path. It is hoped that in the future we can calculate this from the `embed.FS` -itself. +in a "live reload". The location of the assets will be inferred from the `embed.FS`. More details can be found in the [Application Development Guide](/docs/guides/application-development). diff --git a/website/docs/reference/cli.mdx b/website/docs/reference/cli.mdx index 916574198..4c0cc6c95 100644 --- a/website/docs/reference/cli.mdx +++ b/website/docs/reference/cli.mdx @@ -130,10 +130,11 @@ Your system is ready for Wails development! | Flag | Description | Default | | :------------------- | :-------------------------------------- | :------------------------- | -| -assetdir "./path/to/assets" | The path to your compiled assets | Value in `wails.json` | +| -assetdir "./path/to/assets" | Serve assets from the given directory instead of using the provided asset FS | Value in `wails.json` | | -browser | Opens a browser to `http://localhost:34115` on startup | | | -compiler "compiler"| Use a different go compiler to build, eg go1.15beta1 | go | | -e | Extensions to trigger rebuilds (comma separated) | go | +| -reloaddirs | Additional directories to trigger reloads (comma separated) | Value in `wails.json` | | -ldflags "flags" | Additional ldflags to pass to the compiler | | | -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | | -loglevel "loglevel"| Loglevel to use - Trace, Debug, Info, Warning, Error | Debug | diff --git a/website/docs/reference/project-config.mdx b/website/docs/reference/project-config.mdx index f27da3fe3..e74a571af 100644 --- a/website/docs/reference/project-config.mdx +++ b/website/docs/reference/project-config.mdx @@ -9,7 +9,8 @@ The project config resides in the `wails.json` file in the project directory. Th ```json { "name": "[The project name]", - "assetdir": "[Relative path to the directory containing the compiled assets]", + "assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]", + "reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", "frontend:dev": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers]",