Webpack: don't cache build_config with @preval

This commit is contained in:
Alex Gleason 2021-09-03 14:00:54 -05:00
parent 868f514f5b
commit 54d7d9c6db
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,19 @@
const { resolve } = require('path');
const { env } = require('../configuration');
// This is a hack, used to force build_config @preval to recompile
// https://github.com/kentcdodds/babel-plugin-preval/issues/19
module.exports = {
test: resolve(__dirname, '../../app/soapbox/build_config.js'),
use: [
{
loader: 'babel-loader',
options: {
cacheDirectory: false,
cacheCompression: env.NODE_ENV === 'production',
compact: env.NODE_ENV === 'production',
},
},
],
};

View file

@ -1,6 +1,7 @@
const babel = require('./babel');
const git = require('./babel-git');
const gitRefresh = require('./git-refresh');
const buildConfig = require('./babel-build-config');
const css = require('./css');
const file = require('./file');
const nodeModules = require('./node_modules');
@ -15,4 +16,5 @@ module.exports = [
babel,
git,
gitRefresh,
buildConfig,
];