🐛 Rollback esm worker (#7792)
Some checks failed
_DEVELOP / build-bundle (push) Has been cancelled
_DEVELOP / build-docker (push) Has been cancelled
_STAGING / build-bundle (push) Has been cancelled
_STAGING / build-docker (push) Has been cancelled
Commit Message Check / Check Commit Message (push) Has been cancelled
CI: Tests / Integration Tests (push) Has been cancelled

This commit is contained in:
Alonso Torres
2025-11-20 16:07:22 +01:00
committed by GitHub
parent 7e33a7c1a7
commit 0120a5335b
3 changed files with 13 additions and 19 deletions

View File

@@ -83,7 +83,7 @@
:source-map-detail-level :all}}}
:worker
{:target :esm
{:target :browser
:output-dir "resources/public/js/worker/"
:asset-path "/js/worker"
:devtools {:browser-inject :main

View File

@@ -18,7 +18,6 @@
[app.main.data.notifications :as ntf]
[app.main.data.project :as dpj]
[app.main.data.team :as dtm]
[app.main.features :as features]
[app.main.fonts :as fonts]
[app.main.rasterizer :as thr]
[app.main.refs :as refs]
@@ -59,11 +58,6 @@
(defn render-thumbnail
[file-id revn]
(if (features/active-feature? @st/state "render-wasm/v1")
(->> (mw/ask! {:cmd :thumbnails/generate-for-file-wasm
:revn revn
:file-id file-id
:width thumbnail-width}))
(->> (mw/ask! {:cmd :thumbnails/generate-for-file
:revn revn
:file-id file-id
@@ -74,7 +68,7 @@
(rx/map (fn [styles]
(-> result
(assoc :styles styles
:width thumbnail-width))))))))))
:width thumbnail-width)))))))))
(defn- ask-for-thumbnail
"Creates some hooks to handle the files thumbnails cache"

View File

@@ -89,7 +89,7 @@
(defn init
"Return a initialized webworker instance."
[path on-error]
(let [instance (js/Worker. path #js {:type "module"})
(let [instance (js/Worker. path)
bus (rx/subject)
worker (Worker. instance (rx/to-observable bus))