bigbuffet-rw/webpack/rules/babel-git.js

20 lines
516 B
JavaScript
Raw Normal View History

2021-03-30 13:24:02 -07:00
const { resolve } = require('path');
const { env } = require('../configuration');
2021-03-30 13:40:58 -07: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 13:24:02 -07: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',
},
},
],
};