Fix preval cache issues

merge-requests/461/head
Alex Gleason 2021-03-30 15:40:58 -05:00
rodzic 5b93da45ca
commit 8b7c8f6eac
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
4 zmienionych plików z 22 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,8 @@
const { resolve } = require('path');
// Forces recompile whenever the current commit changes
// Useful for generating the version hash in the UI
module.exports = function(source, map) {
this.addDependency(resolve(__dirname, '../../.git/logs/HEAD'));
this.callback(null, source, map);
};

Wyświetl plik

@ -1,6 +1,9 @@
const { resolve } = require('path');
const { env } = require('../configuration');
// This is a hack, used in conjunction with rules/git-refresh.js
// https://github.com/kentcdodds/babel-plugin-preval/issues/19
module.exports = {
test: resolve(__dirname, '../../app/soapbox/utils/code.js'),
use: [

Wyświetl plik

@ -0,0 +1,9 @@
const { resolve } = require('path');
// Recompile code.js whenever git changes
module.exports = {
test: resolve(__dirname, '../../app/soapbox/utils/code.js'),
use: {
loader: resolve(__dirname, '../loaders/git-loader.js'),
},
};

Wyświetl plik

@ -1,5 +1,6 @@
const babel = require('./babel');
const git = require('./babel-git');
const gitRefresh = require('./git-refresh');
const css = require('./css');
const file = require('./file');
const nodeModules = require('./node_modules');
@ -13,4 +14,5 @@ module.exports = [
nodeModules,
babel,
git,
gitRefresh,
];