const class compilerEs::CommonJs

sys::Obj
  compilerEs::ModuleSystem
    compilerEs::CommonJs

Source

CommonJs

doWriteInclude

protected virtual override OutStream doWriteInclude(OutStream out, Str module, Str path)

Source

ext

virtual const override Str ext := "js"

Source

make

new make(File nodeDir)

Source

moduleDir

virtual const override File moduleDir := this.nodeDir.plus(`node_modules/`)

Source

moduleStart

const static Str moduleStart := ...

Source

moduleType

virtual const override Str moduleType := "cjs"

Source

writeBeginModule

virtual override This writeBeginModule(OutStream out)

Source

writeEndModule

virtual override OutStream writeEndModule(OutStream out)

Source

writeExports

virtual override OutStream writeExports(OutStream out, Str[] exports)

Source