diff --git a/src/transforms/posthtml.js b/src/transforms/posthtml.js index 29f9f2d6b20..59f0f586b4c 100644 --- a/src/transforms/posthtml.js +++ b/src/transforms/posthtml.js @@ -25,13 +25,12 @@ async function transform(asset) { } async function getConfig(asset) { - let config = - (await asset.getPackage()).posthtml || - (await asset.getConfig([ - '.posthtmlrc', - '.posthtmlrc.js', - 'posthtml.config.js' - ])); + let config = await asset.getConfig( + ['.posthtmlrc', '.posthtmlrc.js', 'posthtml.config.js'], + { + packageKey: 'posthtml' + } + ); if (!config && !asset.options.minify) { return; }