mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-25 23:01:26 -05:00
fix: hot reload (#45871)
This commit is contained in:
committed by
GitHub
parent
5908f2c74c
commit
08b60ffb25
@@ -21,7 +21,7 @@ exports.replaceChallengeNode = () => {
|
||||
const blockNameRe = /\d\d-[-\w]+\/([^/]+)\//;
|
||||
const posix = path.normalize(filePath).split(path.sep).join(path.posix.sep);
|
||||
const blockName = posix.match(blockNameRe)[1];
|
||||
const metaPath = path.resolve(META_DIR, `/${blockName}/meta.json`);
|
||||
const metaPath = path.resolve(META_DIR, `${blockName}/meta.json`);
|
||||
delete require.cache[require.resolve(metaPath)];
|
||||
const meta = require(metaPath);
|
||||
// TODO: reimplement hot-reloading of certifications
|
||||
|
||||
Reference in New Issue
Block a user