diff --git a/cmd/wails/3_build.go b/cmd/wails/3_build.go index bf3012414..7b5538766 100644 --- a/cmd/wails/3_build.go +++ b/cmd/wails/3_build.go @@ -215,7 +215,7 @@ func init() { // If we are forcing a rebuild if forceRebuild { - buildCommand.Add(" -a") + buildCommand.Add("-a") } // Release mode diff --git a/renderer_headless.go b/renderer_headless.go index 0d5749b04..b348009b1 100644 --- a/renderer_headless.go +++ b/renderer_headless.go @@ -126,6 +126,13 @@ func (h *Headless) start(conn *websocket.Conn) { h.injectCSS(h.frameworkCSS) } + var injectHTML string + if h.appConfig.isHTMLFragment { + injectHTML = fmt.Sprintf("$('#app').html('%s')", h.appConfig.HTML) + } + + h.evalJS(injectHTML) + // Inject user CSS if h.appConfig.CSS != "" { outputCSS := fmt.Sprintf("%.45s", h.appConfig.CSS)