about summary refs log tree commit diff
path: root/config/webpack/rules/tesseract.js
diff options
context:
space:
mode:
Diffstat (limited to 'config/webpack/rules/tesseract.js')
-rw-r--r--config/webpack/rules/tesseract.js14
1 files changed, 14 insertions, 0 deletions
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]',
+    },
+  },
+};