master
Jerome Wu 5 years ago
parent de4b98ae23
commit 4f14b4b79c
  1. 3
      scripts/webpack.config.dev.js
  2. 5
      scripts/webpack.config.prod.js
  3. 1
      tests/recognize.test.js

@ -31,6 +31,9 @@ module.exports = [
libraryTarget: 'umd',
}),
genConfig({
optimization: {
minimize: false,
},
entry: path.resolve(__dirname, '..', 'src', 'index.js'),
filename: 'tesseract.asm.dev.js',
library: 'Tesseract',

@ -7,7 +7,7 @@ const genConfig = ({
...common,
...config,
mode: 'production',
// devtool: 'source-map',
devtool: 'source-map',
entry,
output: {
path: path.resolve(__dirname, '..', 'dist'),
@ -25,6 +25,9 @@ module.exports = [
libraryTarget: 'umd',
}),
genConfig({
optimization: {
minimize: false,
},
entry: path.resolve(__dirname, '..', 'src', 'index.js'),
filename: 'tesseract.asm.min.js',
library: 'Tesseract',

@ -1,4 +1,5 @@
const { TesseractWorker } = Tesseract;
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
const IMAGE_PATH = 'http://localhost:3000/tests/assets/images';
const SIMPLE_TEXT = 'Tesseract.js\n';

Loading…
Cancel
Save