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.
32 lines
808 B
32 lines
808 B
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: [
|
|
[
|
|
'transform-react-remove-prop-types',
|
|
{
|
|
mode: 'remove',
|
|
removeImport: true,
|
|
additionalLibraries: [
|
|
'../../utils/shared-props', // emoji-mart
|
|
],
|
|
},
|
|
],
|
|
],
|
|
cacheDirectory: join(settings.cache_path, 'babel-loader-node-modules'),
|
|
cacheCompression: env.NODE_ENV === 'production',
|
|
compact: false,
|
|
sourceMaps: false,
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|