Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101493768
PublicPathRuntimeModule.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
Tue, Feb 11, 00:04
Size
671 B
Mime Type
text/x-c++
Expires
Thu, Feb 13, 00:04 (2 d)
Engine
blob
Format
Raw Data
Handle
24147635
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
PublicPathRuntimeModule.js
View Options
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
class PublicPathRuntimeModule extends RuntimeModule {
constructor() {
super("publicPath", RuntimeModule.STAGE_BASIC);
}
/**
* @returns {string} runtime code
*/
generate() {
const { compilation } = this;
const { publicPath } = compilation.outputOptions;
return `${RuntimeGlobals.publicPath} = ${JSON.stringify(
this.compilation.getPath(publicPath || "", {
hash: this.compilation.hash || "XXXX"
})
)};`;
}
}
module.exports = PublicPathRuntimeModule;
Event Timeline
Log In to Comment