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.
 
 

42 lines
873 B

var path = require('path');
var webpack = require('webpack');
function config({entry, output, include}) {
return {
devtool: 'cheap-module-eval-source-map',
entry,
output: Object.assign({}, output, {
path: path.join(__dirname, 'build'),
publicPath: '/tesseract/',
}),
plugins: [
new webpack.NoErrorsPlugin()
],
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel'],
include
}]
},
node: {
fs: "empty"
}
}
}
module.exports = [{
entry: './src/browser/index.js',
output: {
filename: 'tesseract.js',
library: "Tesseract",
libraryTarget: "umd"
},
include: [path.join(__dirname, 'src/browser')]
}, {
entry: './src/worker/index.js',
output: {
filename: 'tesseract.worker.js',
},
include: [path.join(__dirname, 'src/worker')]
}].map(config);