Post-processors
Similar to the preprocessor the compiler output can be modified via registerPostprocessor
import { registerPostprocessor } from '@riotjs/compiler'
import buble from 'buble'
// your compiler output will pass from here
registerPostprocessor(function(code, { options }) {
const { file } = options
console.log('your file path is:', file)
// notice that buble.transform returns {code, map}
return buble.transform(code)
})
In this case we make sure that the output code will be converted to es2015 via buble
.