|
|
@ -2,19 +2,19 @@ const { join, resolve } = require('path');
|
|
|
|
|
|
|
|
|
|
|
|
const { env, settings } = require('../configuration');
|
|
|
|
const { env, settings } = require('../configuration');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Those modules contain modern ES code that need to be transpiled for Webpack to process it
|
|
|
|
|
|
|
|
const nodeModulesToProcess = [
|
|
|
|
|
|
|
|
'@reduxjs', 'fuzzysort'
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
module.exports = {
|
|
|
|
test: /\.(js|jsx|mjs|ts|tsx)$/,
|
|
|
|
test: /\.(js|jsx|mjs|ts|tsx)$/,
|
|
|
|
include: [
|
|
|
|
include: [
|
|
|
|
settings.source_path,
|
|
|
|
settings.source_path,
|
|
|
|
...settings.resolved_paths,
|
|
|
|
...settings.resolved_paths,
|
|
|
|
'node_modules/@reduxjs'
|
|
|
|
...nodeModulesToProcess.map(p => resolve(`node_modules/${p}`)),
|
|
|
|
].map(p => resolve(p)),
|
|
|
|
].map(p => resolve(p)),
|
|
|
|
exclude: function(modulePath) {
|
|
|
|
exclude: new RegExp('node_modules\\/(?!(' + nodeModulesToProcess.join('|')+')\\/).*'),
|
|
|
|
return (
|
|
|
|
|
|
|
|
/node_modules/.test(modulePath) &&
|
|
|
|
|
|
|
|
!/@reduxjs/.test(modulePath)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
use: [
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
loader: 'babel-loader',
|
|
|
|
loader: 'babel-loader',
|
|
|
|