#Hooking into default export methods

3 messages · Page 1 of 1 (latest)

half star
#

you need to replace it completely

#

you can just replace the compile function of the exiting codec with the modified function

#
// start of plugin
let originalCompile

// in the plugin load event
originalCompile = Codecs.obj.compile
Codecs.obj.compile = options => {
  // your compile code here
}

// in the plugin unload event
Codecs.obj.compile = originalCompile```