mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 21:10:54 +08:00
Fixes #1343
This commit is contained in:
parent
a8357a2459
commit
41f9c07c88
@ -220,6 +220,10 @@ func generateBindings(bindings *binding.Bindings) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if projectConfig.WailsJSDir == "" {
|
||||
projectConfig.WailsJSDir = filepath.Join(cwd, "frontend")
|
||||
}
|
||||
|
||||
targetDir := filepath.Join(projectConfig.WailsJSDir, "wailsjs", "go")
|
||||
err = os.RemoveAll(targetDir)
|
||||
if err != nil {
|
||||
|
@ -383,8 +383,13 @@ Please reinstall by doing the following:
|
||||
}
|
||||
|
||||
func generateRuntimeWrapper(options *Options) error {
|
||||
|
||||
if options.WailsJSDir == "" {
|
||||
options.WailsJSDir = filepath.Join("./frontend")
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
options.WailsJSDir = filepath.Join(cwd, "frontend")
|
||||
}
|
||||
wrapperDir := filepath.Join(options.WailsJSDir, "wailsjs", "runtime")
|
||||
_ = os.RemoveAll(wrapperDir)
|
||||
|
@ -85,6 +85,8 @@ func Build(options *Options) (string, error) {
|
||||
// wails js dir
|
||||
if projectData.WailsJSDir != "" {
|
||||
options.WailsJSDir = projectData.WailsJSDir
|
||||
} else {
|
||||
options.WailsJSDir = filepath.Join(cwd, "frontend")
|
||||
}
|
||||
|
||||
// Set build directory
|
||||
|
Loading…
Reference in New Issue
Block a user