mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #442 from sharelatex/as-module-lazy-load
Lazy load rich text module
This commit is contained in:
commit
13dfb8d6db
2 changed files with 3 additions and 2 deletions
|
@ -150,6 +150,8 @@ module.exports = (app, webRouter, privateApiRouter, publicApiRouter)->
|
|||
res.locals.buildWebpackPath = (jsFile, opts = {}) ->
|
||||
if Settings.webpack? and !Settings.useMinifiedJs
|
||||
path = Path.join(jsPath, jsFile)
|
||||
if opts.removeExtension == true
|
||||
path = path.slice(0,-3)
|
||||
return "#{Settings.webpack.url}/public#{path}"
|
||||
else
|
||||
return res.locals.buildJsPath(jsFile, opts)
|
||||
|
|
|
@ -133,6 +133,7 @@ block requirejs
|
|||
"fineuploader": "libs/#{lib('fineuploader')}",
|
||||
"ide": "#{buildJsPath('ide.js', {hashedPath:settings.useMinifiedJs, removeExtension:true})}",
|
||||
"libraries": "#{buildJsPath('libraries.js', {hashedPath:settings.useMinifiedJs, removeExtension:true})}",
|
||||
!{moduleIncludes("editor:script", locals)}
|
||||
},
|
||||
"waitSeconds": 0,
|
||||
"shim": {
|
||||
|
@ -159,8 +160,6 @@ block requirejs
|
|||
window.pdfCMapsPath = "#{pdfCMapsPath}"
|
||||
window.uiConfig = JSON.parse('!{JSON.stringify(uiConfig).replace(/\//g, "\\/")}');
|
||||
|
||||
!= moduleIncludes("editor:script", locals)
|
||||
|
||||
script(
|
||||
data-main=buildJsPath("ide.js", {hashedPath:false}),
|
||||
baseurl=fullJsPath,
|
||||
|
|
Loading…
Reference in a new issue