Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101959662
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, Feb 15, 14:59
Size
1 KB
Mime Type
text/x-c++
Expires
Mon, Feb 17, 14:59 (2 d)
Engine
blob
Format
Raw Data
Handle
24228129
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