2019-03-15 10:05:31 -04:00
|
|
|
const { join } = require('path');
|
|
|
|
const { settings, env } = require('../configuration');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
test: /\.(js|mjs)$/,
|
|
|
|
include: /node_modules/,
|
2020-08-31 18:26:10 -04:00
|
|
|
exclude: [
|
|
|
|
/@babel(?:\/|\\{1,2})runtime/,
|
|
|
|
/tesseract.js/,
|
|
|
|
],
|
2019-03-15 10:05:31 -04:00
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
babelrc: false,
|
|
|
|
plugins: [
|
2019-03-29 20:41:35 -04:00
|
|
|
'transform-react-remove-prop-types',
|
2019-03-15 10:05:31 -04:00
|
|
|
],
|
|
|
|
cacheDirectory: join(settings.cache_path, 'babel-loader-node-modules'),
|
|
|
|
cacheCompression: env.NODE_ENV === 'production',
|
|
|
|
compact: false,
|
|
|
|
sourceMaps: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|