diff --git a/packages/pug/lib/index.js b/packages/pug/lib/index.js index e76487d2c..2d9b16c9c 100644 --- a/packages/pug/lib/index.js +++ b/packages/pug/lib/index.js @@ -172,7 +172,7 @@ function compileBody(str, options){ // Compile ast = applyPlugins(ast, options, plugins, 'preCodeGen'); - var js = generateCode(ast, { + var js = (findReplacementFunc(plugins, 'generateCode') || generateCode)(ast, { pretty: options.pretty, compileDebug: options.compileDebug, doctype: options.doctype,