mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-23 01:12:27 +00:00
Replace logger
with console
in frontend macro (#16816)
* Replace `logger` with `console` in frontend macro logger import is causing problems cleaning node_modules/.cache after webpack builds. Since macros are used at build time we can use console statements. GitOrigin-RevId: 22bbbb34391334ec8f8ec256a3a8a72e5fe91588
This commit is contained in:
parent
93976a2748
commit
26ee64fe62
1 changed files with 2 additions and 3 deletions
|
@ -1,6 +1,5 @@
|
|||
const fs = require('fs')
|
||||
const Path = require('path')
|
||||
const logger = require('@overleaf/logger')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = function invalidateBabelCacheIfNeeded() {
|
||||
|
@ -13,8 +12,8 @@ module.exports = function invalidateBabelCacheIfNeeded() {
|
|||
|
||||
const newState = JSON.stringify(Settings.overleafModuleImports)
|
||||
if (lastState !== newState) {
|
||||
logger.warn(
|
||||
{},
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
'Detected change in overleafModuleImports, purging babel cache!'
|
||||
)
|
||||
fs.rmSync(cachePath, { recursive: true, force: true, maxRetries: 5 })
|
||||
|
|
Loading…
Reference in a new issue