mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 08:10:56 +08:00
add warning about dynamic assets and vite v5.0.0+ (#3254)
* add warning about dynamic assets and vite v5.0.0+
This commit is contained in:
parent
57e6834bd2
commit
8145b0e0c5
@ -1,5 +1,14 @@
|
|||||||
# Dynamic Assets
|
# 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
|
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
|
[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
|
be called for any non GET request on the assets server and for GET requests which can not be served from the
|
||||||
|
@ -314,6 +314,15 @@ If not defined, the result is the following in cases where the Handler would hav
|
|||||||
- GET request: `http.StatusNotFound`
|
- GET request: `http.StatusNotFound`
|
||||||
- Other request: `http.StatusMethodNotAllowed`
|
- 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
|
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.
|
on every path, that does not contain a file extension.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user