[v2] Support fs.FS for assets

Reloading changed asset files in dev mode will only work
if an embed.FS has been provided for the assets.
This commit is contained in:
stffabi
2021-12-03 10:25:38 +01:00
parent f3b2f6ab76
commit 6fcd4b7bd4
9 changed files with 196 additions and 135 deletions

View File

@@ -2,11 +2,11 @@ package options
import (
"context"
"embed"
"github.com/wailsapp/wails/v2/pkg/options/linux"
"io/fs"
"log"
"runtime"
"github.com/wailsapp/wails/v2/pkg/options/linux"
"github.com/wailsapp/wails/v2/pkg/options/mac"
"github.com/wailsapp/wails/v2/pkg/options/windows"
@@ -41,7 +41,7 @@ type App struct {
HideWindowOnClose bool
AlwaysOnTop bool
RGBA *RGBA
Assets embed.FS
Assets fs.FS
Menu *menu.Menu
Logger logger.Logger `json:"-"`
LogLevel logger.LogLevel