Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

109
Views
Which JavaScript runtime the Pug 3.X using?

The Pug pre-processor supports the JavaScript code, but the runtime is pretty specific. What I already know about is:

  • Although it is operating by Node.js, it does not supports the Common.js modules (the module variable is undefined).
  • windows is undefined
  • For the Pug 3.X case, the ECMAScript standard at least until ES2019 seems to be supported

Why 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.

[ Appendix ] The content of 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: '>'
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!