Pure Javascript OCR for more than 100 Languages 📖🎉🖥
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

47 lines
1016 B

const path = require('path');
const webpack = require('webpack');
const common = require('./webpack.config.common');
const genConfig = ({
entry, filename, library, libraryTarget, ...config
}) => ({
...common,
...config,
mode: 'development',
entry,
output: {
filename,
library,
libraryTarget,
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
TESS_ENV: JSON.stringify('development'),
},
}),
],
});
module.exports = [
genConfig({
entry: path.resolve(__dirname, '..', 'src', 'index.js'),
filename: 'tesseract.dev.js',
library: 'Tesseract',
libraryTarget: 'umd',
}),
genConfig({
optimization: {
minimize: false,
},
entry: path.resolve(__dirname, '..', 'src', 'index.js'),
filename: 'tesseract.asm.dev.js',
library: 'Tesseract',
libraryTarget: 'umd',
resolve: {
alias: {
'tesseract.js-core/tesseract-core.wasm.js': 'tesseract.js-core/tesseract-core.asm.js',
},
},
}),
];