mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 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
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:
@@ -83,7 +83,7 @@
|
|||||||
:source-map-detail-level :all}}}
|
:source-map-detail-level :all}}}
|
||||||
|
|
||||||
:worker
|
:worker
|
||||||
{:target :esm
|
{:target :browser
|
||||||
:output-dir "resources/public/js/worker/"
|
:output-dir "resources/public/js/worker/"
|
||||||
:asset-path "/js/worker"
|
:asset-path "/js/worker"
|
||||||
:devtools {:browser-inject :main
|
:devtools {:browser-inject :main
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
[app.main.data.notifications :as ntf]
|
[app.main.data.notifications :as ntf]
|
||||||
[app.main.data.project :as dpj]
|
[app.main.data.project :as dpj]
|
||||||
[app.main.data.team :as dtm]
|
[app.main.data.team :as dtm]
|
||||||
[app.main.features :as features]
|
|
||||||
[app.main.fonts :as fonts]
|
[app.main.fonts :as fonts]
|
||||||
[app.main.rasterizer :as thr]
|
[app.main.rasterizer :as thr]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
@@ -59,11 +58,6 @@
|
|||||||
|
|
||||||
(defn render-thumbnail
|
(defn render-thumbnail
|
||||||
[file-id revn]
|
[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
|
(->> (mw/ask! {:cmd :thumbnails/generate-for-file
|
||||||
:revn revn
|
:revn revn
|
||||||
:file-id file-id
|
:file-id file-id
|
||||||
@@ -74,7 +68,7 @@
|
|||||||
(rx/map (fn [styles]
|
(rx/map (fn [styles]
|
||||||
(-> result
|
(-> result
|
||||||
(assoc :styles styles
|
(assoc :styles styles
|
||||||
:width thumbnail-width))))))))))
|
:width thumbnail-width)))))))))
|
||||||
|
|
||||||
(defn- ask-for-thumbnail
|
(defn- ask-for-thumbnail
|
||||||
"Creates some hooks to handle the files thumbnails cache"
|
"Creates some hooks to handle the files thumbnails cache"
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
(defn init
|
(defn init
|
||||||
"Return a initialized webworker instance."
|
"Return a initialized webworker instance."
|
||||||
[path on-error]
|
[path on-error]
|
||||||
(let [instance (js/Worker. path #js {:type "module"})
|
(let [instance (js/Worker. path)
|
||||||
bus (rx/subject)
|
bus (rx/subject)
|
||||||
worker (Worker. instance (rx/to-observable bus))
|
worker (Worker. instance (rx/to-observable bus))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user