mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-28 19:41:33 +02:00
Merge pull request #4000 from overleaf/jpa-skip-pug-compile
[Server] optionally skip pre-compiling pug templates in production GitOrigin-RevId: c50e6007dae3b0ab83a7edbce07a695a17e71404
This commit is contained in:
@@ -242,7 +242,7 @@ if (Settings.enabledServices.includes('api')) {
|
||||
if (Settings.enabledServices.includes('web')) {
|
||||
logger.info('providing web router')
|
||||
|
||||
if (app.get('env') === 'production') {
|
||||
if (Settings.precompilePugTemplatesAtBootTime) {
|
||||
logger.info('precompiling views for web in production environment')
|
||||
Views.precompileViews(app)
|
||||
}
|
||||
|
||||
@@ -473,6 +473,7 @@ module.exports = settings =
|
||||
# Production Settings
|
||||
# -------------------
|
||||
debugPugTemplates: process.env['DEBUG_PUG_TEMPLATES'] == 'true'
|
||||
precompilePugTemplatesAtBootTime: if process.env['PRECOMPILE_PUG_TEMPLATES_AT_BOOT_TIME'] then process.env['PRECOMPILE_PUG_TEMPLATES_AT_BOOT_TIME'] == 'true' else process.env.NODE_ENV == 'production'
|
||||
|
||||
# Should javascript assets be served minified or not. Note that you will
|
||||
# need to run `grunt compile:minify` within the web-sharelatex directory
|
||||
|
||||
Reference in New Issue
Block a user