mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 22:49:31 +08:00
[v2, runtime] Separate runtime js debug build (#2745)
This commit is contained in:
parent
abbbf05a79
commit
5292ced731
@ -78,10 +78,8 @@ if (window.wailsbindings) {
|
|||||||
delete window.wails.SetBindings;
|
delete window.wails.SetBindings;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is evaluated at build time in package.json
|
// (bool) This is evaluated at build time in package.json
|
||||||
// const dev = 0;
|
if (!DEBUG) {
|
||||||
// const production = 1;
|
|
||||||
if (ENV === 1) {
|
|
||||||
delete window.wailsbindings;
|
delete window.wailsbindings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
"build": "run-p build:*",
|
"build": "run-p build:*",
|
||||||
"build:ipc-desktop": "npx esbuild desktop/ipc.js --bundle --minify --outfile=ipc.js",
|
"build:ipc-desktop": "npx esbuild desktop/ipc.js --bundle --minify --outfile=ipc.js",
|
||||||
"build:ipc-dev": "cd dev && npm install && npm run build",
|
"build:ipc-dev": "cd dev && npm install && npm run build",
|
||||||
"build:runtime-desktop-prod": "npx esbuild desktop/main.js --bundle --minify --outfile=runtime_prod_desktop.js --define:ENV=1",
|
"build:runtime-desktop-prod": "npx esbuild desktop/main.js --bundle --minify --outfile=runtime_prod_desktop.js --define:DEBUG=false",
|
||||||
"build:runtime-desktop-dev": "npx esbuild desktop/main.js --bundle --sourcemap=inline --outfile=runtime_dev_desktop.js --define:ENV=0",
|
"build:runtime-desktop-debug": "npx esbuild desktop/main.js --bundle --sourcemap=inline --outfile=runtime_debug_desktop.js --define:DEBUG=true",
|
||||||
"test": "vitest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"author": "Lea Anthony <lea.anthony@gmail.com>",
|
"author": "Lea Anthony <lea.anthony@gmail.com>",
|
||||||
|
8
v2/internal/frontend/runtime/runtime_debug_desktop.go
Normal file
8
v2/internal/frontend/runtime/runtime_debug_desktop.go
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//go:build debug || !production
|
||||||
|
|
||||||
|
package runtime
|
||||||
|
|
||||||
|
import _ "embed"
|
||||||
|
|
||||||
|
//go:embed runtime_debug_desktop.js
|
||||||
|
var RuntimeDesktopJS []byte
|
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
|||||||
//go:build dev || bindings || (!dev && !production && !bindings)
|
|
||||||
|
|
||||||
package runtime
|
|
||||||
|
|
||||||
import _ "embed"
|
|
||||||
|
|
||||||
//go:embed runtime_dev_desktop.js
|
|
||||||
var RuntimeDesktopJS []byte
|
|
@ -1,4 +1,4 @@
|
|||||||
//go:build production
|
//go:build production && !debug
|
||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Now uses new `go-webview2` module. Added by @leaanthony in [PR](https://github.com/wailsapp/wails/pull/2687).
|
- Now uses new `go-webview2` module. Added by @leaanthony in [PR](https://github.com/wailsapp/wails/pull/2687).
|
||||||
- Changed styling of `doctor` command. Changed by @MarvinJWendt in [PR](https://github.com/wailsapp/wails/pull/2660)
|
- Changed styling of `doctor` command. Changed by @MarvinJWendt in [PR](https://github.com/wailsapp/wails/pull/2660)
|
||||||
- Enable HiDPI option by default in windows nsis installer. Changed by @5aaee9 in [PR](https://github.com/wailsapp/wails/pull/2694)
|
- Enable HiDPI option by default in windows nsis installer. Changed by @5aaee9 in [PR](https://github.com/wailsapp/wails/pull/2694)
|
||||||
|
- Now debug builds include the un-minified version of the runtime JS with source maps . Changed by @mmghv in [PR](https://github.com/wailsapp/wails/pull/2745)
|
||||||
|
|
||||||
## v2.5.1 - 2023-05-16
|
## v2.5.1 - 2023-05-16
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user