The Pug pre-processor supports the JavaScript code, but the runtime is pretty specific. What I already know about is:
module variable is undefined).windows is undefinedWhy I need to know it is I want to build some JavaScript by Webpack for the Pug, but I have not idea about correct config like target, library.type etc but I must to discuss it in other topics.
globalThis<ref *1> Object [global] {
global: [Circular *1],
clearInterval: [Function: clearInterval],
clearTimeout: [Function: clearTimeout],
setInterval: [Function: setInterval],
setTimeout: [Function: setTimeout] {
[Symbol(nodejs.util.promisify.custom)]: [Getter]
},
queueMicrotask: [Function: queueMicrotask],
performance: Performance {
nodeTiming: PerformanceNodeTiming {
name: 'node',
entryType: 'node',
startTime: 0,
duration: 773790.390599966,
nodeStart: 0.37929999828338623,
v8Start: 2.1448000073432922,
bootstrapComplete: 17.92469996213913,
environment: 9.58629995584488,
loopStart: 6346.262699961662,
loopExit: -1,
idleTime: 754437.6814
},
timeOrigin: 1657253267181.48
},
clearImmediate: [Function: clearImmediate],
setImmediate: [Function: setImmediate] {
[Symbol(nodejs.util.promisify.custom)]: [Getter]
},
indent_handlebars: false,
input_char: '>'
}