perf: reduce tesseract bundle size by directly importing createWorker (#1979)
This commit is contained in:
parent
a2dcbcdcda
commit
f22b1bf328
|
@ -4,7 +4,7 @@
|
|||
// We should explore this at a later date.
|
||||
import corePath from 'tesseract.js-core/tesseract-core.wasm.js'
|
||||
import workerPath from 'tesseract.js/dist/worker.min.js'
|
||||
import { createWorker } from 'tesseract.js'
|
||||
import createWorker from 'tesseract.js/src/createWorker.js'
|
||||
|
||||
const { origin } = location
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@ const NOOP_MODULES = [
|
|||
'tesseract.js/dist/worker.min.js.map',
|
||||
'tesseract.js-core/tesseract-core.wasm',
|
||||
'tesseract.js-core/tesseract-core.wasm.js',
|
||||
'tesseract.js'
|
||||
'tesseract.js/src/createWorker.js',
|
||||
'tesseract.js/src/createWorker.js.map'
|
||||
]
|
||||
|
||||
const serverResolve = JSON.parse(JSON.stringify(resolve))
|
||||
|
|
Loading…
Reference in a new issue