libsForQt5.bismuth: Fix generated JS
As of 5789287a95
, esbuild was updated to
0.18.5 which introduced a new transpilation called "Static fields with
assign semantics now use static blocks if possible"
(https://github.com/evanw/esbuild/blob/v0.18.5/CHANGELOG.md). This
causes generation of JavaScript code that is incompatible with KWin's
JavaScript engine, resulting in errors loading Bismuth.
This update uses esbuild's `--target` option to generate compatible
output code.
This commit is contained in:
parent
3820cc90ca
commit
748ccc92a6
13
pkgs/desktops/plasma-5/3rdparty/addons/bismuth/0001-esbuild-config.patch
vendored
Normal file
13
pkgs/desktops/plasma-5/3rdparty/addons/bismuth/0001-esbuild-config.patch
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/kwinscript/CMakeLists.txt b/src/kwinscript/CMakeLists.txt
|
||||
index 9e2f7054..ed607027 100644
|
||||
--- a/src/kwinscript/CMakeLists.txt
|
||||
+++ b/src/kwinscript/CMakeLists.txt
|
||||
@@ -39,7 +39,7 @@ endif()
|
||||
set(ESBUILD_COMMAND
|
||||
"esbuild" "--bundle" "${CMAKE_CURRENT_SOURCE_DIR}/index.ts"
|
||||
"--outfile=${CMAKE_CURRENT_BINARY_DIR}/bismuth/contents/code/index.mjs"
|
||||
- "--format=esm" "--platform=neutral")
|
||||
+ "--format=esm" "--platform=neutral" "--target=es6")
|
||||
if(USE_NPM)
|
||||
list(PREPEND ESBUILD_COMMAND "npx")
|
||||
endif()
|
@ -21,6 +21,10 @@ mkDerivation rec {
|
||||
sha256 = "sha256-c13OFEw6E/I8j/mqeLnuc9Chi6pc3+AgwAMPpCzh974=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0001-esbuild-config.patch
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DUSE_TSC=OFF"
|
||||
"-DUSE_NPM=OFF"
|
||||
|
Loading…
Reference in New Issue
Block a user