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.
30 lines
670 B
30 lines
670 B
const path = require('path'); |
|
const common = require('./webpack.config.common'); |
|
|
|
const genConfig = ({ |
|
entry, filename, library, libraryTarget, |
|
}) => ({ |
|
...common, |
|
mode: 'production', |
|
devtool: 'source-map', |
|
entry, |
|
output: { |
|
path: path.resolve(__dirname, '..', 'dist'), |
|
filename, |
|
library, |
|
libraryTarget, |
|
}, |
|
}); |
|
|
|
module.exports = [ |
|
genConfig({ |
|
entry: path.resolve(__dirname, '..', 'src', 'index.js'), |
|
filename: 'tesseract.min.js', |
|
library: 'Tesseract', |
|
libraryTarget: 'umd', |
|
}), |
|
genConfig({ |
|
entry: path.resolve(__dirname, '..', 'src', 'worker-script', 'browser', 'index.js'), |
|
filename: 'worker.min.js', |
|
}), |
|
];
|
|
|