Webpack: don't cache build_config with @preval

build-json
Alex Gleason 2021-09-03 14:00:54 -05:00
rodzic 868f514f5b
commit 54d7d9c6db
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 21 dodań i 0 usunięć

Wyświetl plik

@ -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',
},
},
],
};

Wyświetl plik

@ -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,
];