soapbox/webpack/rules/babel-git.js

20 wiersze
516 B
JavaScript
Czysty Zwykły widok Historia

2021-03-30 20:24:02 +00:00
const { resolve } = require('path');
const { env } = require('../configuration');
2021-03-30 20:40:58 +00:00
// This is a hack, used in conjunction with rules/git-refresh.js
// https://github.com/kentcdodds/babel-plugin-preval/issues/19
2021-03-30 20:24:02 +00:00
module.exports = {
test: resolve(__dirname, '../../app/soapbox/utils/code.js'),
use: [
{
loader: 'babel-loader',
options: {
cacheDirectory: false,
cacheCompression: env.NODE_ENV === 'production',
compact: env.NODE_ENV === 'production',
},
},
],
};