This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2019-03-15 07:05:31 -07:00
|
|
|
const { join } = require('path');
|
2023-05-23 08:15:17 -07:00
|
|
|
|
2019-03-15 07:05:31 -07:00
|
|
|
const { settings, env } = require('../configuration');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
test: /\.(js|mjs)$/,
|
|
|
|
include: /node_modules/,
|
2020-08-31 15:26:10 -07:00
|
|
|
exclude: [
|
|
|
|
/@babel(?:\/|\\{1,2})runtime/,
|
|
|
|
/tesseract.js/,
|
|
|
|
],
|
2019-03-15 07:05:31 -07:00
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
babelrc: false,
|
|
|
|
plugins: [
|
2019-03-29 17:41:35 -07:00
|
|
|
'transform-react-remove-prop-types',
|
2019-03-15 07:05:31 -07:00
|
|
|
],
|
|
|
|
cacheDirectory: join(settings.cache_path, 'babel-loader-node-modules'),
|
|
|
|
cacheCompression: env.NODE_ENV === 'production',
|
|
|
|
compact: false,
|
|
|
|
sourceMaps: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|