mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-16 11:53:13 +00:00
5fc5a9f9f1
* [WiP] Update Tesseract.js - Update Tesseract.js to 2.2.1 - Use versioned file names - differentiate two progression states: preparing OCR and detecting picture * Get rid of copy-webpack-plugin
27 lines
607 B
JavaScript
27 lines
607 B
JavaScript
const { join } = require('path');
|
|
const { settings, env } = require('../configuration');
|
|
|
|
module.exports = {
|
|
test: /\.(js|mjs)$/,
|
|
include: /node_modules/,
|
|
exclude: [
|
|
/@babel(?:\/|\\{1,2})runtime/,
|
|
/tesseract.js/,
|
|
],
|
|
use: [
|
|
{
|
|
loader: 'babel-loader',
|
|
options: {
|
|
babelrc: false,
|
|
plugins: [
|
|
'transform-react-remove-prop-types',
|
|
],
|
|
cacheDirectory: join(settings.cache_path, 'babel-loader-node-modules'),
|
|
cacheCompression: env.NODE_ENV === 'production',
|
|
compact: false,
|
|
sourceMaps: false,
|
|
},
|
|
},
|
|
],
|
|
};
|