2020-03-27 20:59:38 +00:00
|
|
|
const { join, resolve } = require('path');
|
2022-01-10 22:25:06 +00:00
|
|
|
|
2020-03-27 20:59:38 +00:00
|
|
|
const { env, settings } = require('../configuration');
|
|
|
|
|
|
|
|
module.exports = {
|
2022-02-27 00:13:35 +00:00
|
|
|
test: /\.(js|jsx|mjs|ts|tsx)$/,
|
2020-03-27 20:59:38 +00:00
|
|
|
include: [
|
|
|
|
settings.source_path,
|
|
|
|
...settings.resolved_paths,
|
|
|
|
].map(p => resolve(p)),
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: [
|
2022-02-27 00:13:35 +00:00
|
|
|
{
|
|
|
|
loader: 'ts-loader',
|
|
|
|
options: {
|
|
|
|
// disable type checker - we will use it in fork plugin
|
|
|
|
transpileOnly: true,
|
|
|
|
},
|
|
|
|
},
|
2020-03-27 20:59:38 +00:00
|
|
|
{
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
cacheDirectory: join(settings.cache_path, 'babel-loader'),
|
|
|
|
cacheCompression: env.NODE_ENV === 'production',
|
|
|
|
compact: env.NODE_ENV === 'production',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|