Cleanup post caching

This commit is contained in:
2022-04-27 04:03:21 -04:00
parent 24a76f8f7c
commit 415f950a42
10 changed files with 68 additions and 41 deletions

View File

@@ -6,13 +6,13 @@ module.exports = {
webpack: (config, options) => {
config.experiments = { asset: true };
const { cachePostLinkData } = require('./util/post-cache');
const { cachePostsMeta } = require('./util/slug');
config.plugins.push(
{
apply: (compiler) => {
compiler.hooks.beforeCompile.tap('cachePostLinkDataInit', _ => {
cachePostLinkData();
compiler.hooks.initialize.tap('cachePostDataBC', _ => {
cachePostsMeta();
});
}
}
@@ -26,7 +26,7 @@ module.exports = {
},
{
test: /\.svg$/,
use: [{ loader: "@svgr/webpack" }],
use: [{ loader: '@svgr/webpack' }],
},
{
test: /\.md$/,