type

CommonJs

src const class CommonJs : ModuleSystem

CommonJs

constructors

fields

methods

Slot Details

doWriteInclude

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

ext

src virtual const override Str ext := "js"

make

src new make(File nodeDir)

moduleDir

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

moduleStart

src const static Str moduleStart := ...

moduleType

src virtual const override Str moduleType := "cjs"

writeBeginModule

src virtual override This writeBeginModule(OutStream out)

writeEndModule

src virtual override OutStream writeEndModule(OutStream out)

writeExports

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