mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
Load settingsCheckModule regardless of module type
GitOrigin-RevId: 7afeb6d5bbe6b5db33c8d1a547009980e6e75c53
This commit is contained in:
parent
46317a9b9c
commit
4919172d52
1 changed files with 10 additions and 4 deletions
|
@ -22,15 +22,21 @@ async function modules() {
|
|||
}
|
||||
|
||||
async function loadModulesImpl() {
|
||||
const settingsCheckModule = Path.join(
|
||||
const settingsCheckModuleCjs = Path.join(
|
||||
MODULE_BASE_PATH,
|
||||
'settings-check',
|
||||
'index.js'
|
||||
)
|
||||
if (fs.existsSync(settingsCheckModule)) {
|
||||
await import(settingsCheckModule)
|
||||
const settingsCheckModuleEsm = Path.join(
|
||||
MODULE_BASE_PATH,
|
||||
'settings-check',
|
||||
'index.mjs'
|
||||
)
|
||||
if (fs.existsSync(settingsCheckModuleCjs)) {
|
||||
await import(settingsCheckModuleCjs)
|
||||
} else if (fs.existsSync(settingsCheckModuleEsm)) {
|
||||
await import(settingsCheckModuleEsm)
|
||||
}
|
||||
|
||||
for (const moduleName of Settings.moduleImportSequence || []) {
|
||||
let path
|
||||
if (fs.existsSync(Path.join(MODULE_BASE_PATH, moduleName, 'index.mjs'))) {
|
||||
|
|
Loading…
Reference in a new issue