From 8145b0e0c573e553a80763127199aec300feb52e Mon Sep 17 00:00:00 2001 From: Benoit Botton Date: Thu, 22 Feb 2024 07:03:45 +0000 Subject: [PATCH] add warning about dynamic assets and vite v5.0.0+ (#3254) * add warning about dynamic assets and vite v5.0.0+ --- website/docs/guides/dynamic-assets.mdx | 9 +++++++++ website/docs/reference/options.mdx | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/website/docs/guides/dynamic-assets.mdx b/website/docs/guides/dynamic-assets.mdx index 0516fb729..8d1debcef 100644 --- a/website/docs/guides/dynamic-assets.mdx +++ b/website/docs/guides/dynamic-assets.mdx @@ -1,5 +1,14 @@ # Dynamic Assets +:::info + +This does not work with vite v5.0.0+ and wails v2 due to changes in vite. +Changes are planned in v3 to support similar functionality under vite v5.0.0+. +If you need this feature, stay with vite v4.0.0+. +See [issue 3240](https://github.com/wailsapp/wails/issues/3240) for details + +::: + If you want to load or generate assets for your frontend dynamically, you can achieve that using the [AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the diff --git a/website/docs/reference/options.mdx b/website/docs/reference/options.mdx index 26fb1afac..19a599b36 100644 --- a/website/docs/reference/options.mdx +++ b/website/docs/reference/options.mdx @@ -314,6 +314,15 @@ If not defined, the result is the following in cases where the Handler would hav - GET request: `http.StatusNotFound` - Other request: `http.StatusMethodNotAllowed` +:::info + +This does not work with vite v5.0.0+ and wails v2 due to changes in vite. +Changes are planned in v3 to support similar functionality under vite v5.0.0+. +If you need this feature, stay with vite v4.0.0+. +See [issue 3240](https://github.com/wailsapp/wails/issues/3240) for details + +::: + NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension.