From 5fc5a9f9f18872cb0f1b54359338b2e189dd2bb1 Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 1 Sep 2020 00:26:10 +0200 Subject: Update Tesseract.js (#14708) * [WiP] Update Tesseract.js - Update Tesseract.js to 2.2.1 - Use versioned file names - differentiate two progression states: preparing OCR and detecting picture * Get rid of copy-webpack-plugin --- config/webpack/rules/tesseract.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 config/webpack/rules/tesseract.js (limited to 'config/webpack/rules/tesseract.js') diff --git a/config/webpack/rules/tesseract.js b/config/webpack/rules/tesseract.js new file mode 100644 index 000000000..de647c8d1 --- /dev/null +++ b/config/webpack/rules/tesseract.js @@ -0,0 +1,14 @@ +module.exports = { + test: [ + /tesseract\.js\/dist\/worker\.min\.js$/, + /tesseract\.js\/dist\/worker\.min\.js.map$/, + /tesseract\.js-core\/tesseract-core\.wasm$/, + /tesseract\.js-core\/tesseract-core\.wasm.js$/, + ], + use: { + loader: 'file-loader', + options: { + name: 'ocr/[name]-[hash].[ext]', + }, + }, +}; -- cgit