mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05: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:
parent
46ecb39bdb
commit
8faae673b4
2 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue