This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2019-03-15 15:05:31 +01:00
|
|
|
const { join } = require('path');
|
|
|
|
const { settings, env } = require('../configuration');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
test: /\.(js|mjs)$/,
|
|
|
|
include: /node_modules/,
|
|
|
|
exclude: /@babel(?:\/|\\{1,2})runtime/,
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
babelrc: false,
|
|
|
|
plugins: [
|
2019-03-16 20:13:15 +01:00
|
|
|
[
|
|
|
|
'transform-react-remove-prop-types',
|
|
|
|
{
|
|
|
|
mode: 'remove',
|
|
|
|
removeImport: true,
|
|
|
|
additionalLibraries: [
|
|
|
|
'../../utils/shared-props', // emoji-mart
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2019-03-15 15:05:31 +01:00
|
|
|
],
|
|
|
|
cacheDirectory: join(settings.cache_path, 'babel-loader-node-modules'),
|
|
|
|
cacheCompression: env.NODE_ENV === 'production',
|
|
|
|
compact: false,
|
|
|
|
sourceMaps: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|