Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121635217
StartupEntrypointRuntimeModule.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jul 12, 16:45
Size
1 KB
Mime Type
text/x-c++
Expires
Mon, Jul 14, 16:45 (2 d)
Engine
blob
Format
Raw Data
Handle
27363779
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
StartupEntrypointRuntimeModule.js
View Options
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict"
;
const
RuntimeGlobals
=
require
(
"../RuntimeGlobals"
);
const
RuntimeModule
=
require
(
"../RuntimeModule"
);
/** @typedef {import("../MainTemplate")} MainTemplate */
class
StartupEntrypointRuntimeModule
extends
RuntimeModule
{
constructor
(
asyncChunkLoading
)
{
super
(
"startup entrypoint"
);
this
.
asyncChunkLoading
=
asyncChunkLoading
;
}
/**
* @returns {string} runtime code
*/
generate
()
{
const
{
compilation
}
=
this
;
const
{
runtimeTemplate
}
=
compilation
;
return
`
$
{
RuntimeGlobals
.
startupEntrypoint
}
=
$
{
runtimeTemplate
.
basicFunction
(
"chunkIds, moduleId"
,
this
.
asyncChunkLoading
?
`
return
Promise
.
all
(
chunkIds
.
map
(
$
{
RuntimeGlobals
.
ensureChunk
},
__webpack_require__
)).
then
(
$
{
runtimeTemplate
.
returningFunction
(
"__webpack_require__(moduleId)"
)})
`
:
[
`
chunkIds
.
map
(
$
{
RuntimeGlobals
.
ensureChunk
},
__webpack_require__
)
`
,
"return __webpack_require__(moduleId)"
]
)}
`
;
}
}
module
.
exports
=
StartupEntrypointRuntimeModule
;
Event Timeline
Log In to Comment