mirror of
https://github.com/ritz078/transform.git
synced 2026-11-22 17:11:32 +03:00
move prettier to worker
This commit is contained in:
1 parent
44104a82c3
commit
ba305352f5
5 files changed
+62
-32
No files matched your search
@@ -0,0 +1,8 @@
|
||||
export default function (fileName) {
|
||||
const PromiseWorker = require('promise-worker')
|
||||
const MyWorker = require(`worker-loader?inline!../workers/${fileName}`)
|
||||
const worker = new MyWorker()
|
||||
const promiseWorker = new PromiseWorker(worker)
|
||||
|
||||
return { worker, promiseWorker }
|
||||
}
|
||||
Reference in new issue
Block a user