pleroma/webpack/rules/babel.js
Alex Gleason 1f549ebe1a Revert "Merge branch 'typescript' into 'develop'"
This reverts merge request !859
2022-02-26 23:55:34 +00:00

22 lines
528 B
JavaScript

const { join, resolve } = require('path');
const { env, settings } = require('../configuration');
module.exports = {
test: /\.(js|jsx|mjs)$/,
include: [
settings.source_path,
...settings.resolved_paths,
].map(p => resolve(p)),
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
cacheDirectory: join(settings.cache_path, 'babel-loader'),
cacheCompression: env.NODE_ENV === 'production',
compact: env.NODE_ENV === 'production',
},
},
],
};