Skip to content

Commit

Permalink
Remove DeprecationWarning: MainTemplate.getAssetPath
Browse files Browse the repository at this point in the history
  • Loading branch information
benignmop authored and jantimon committed Oct 30, 2020
1 parent 9e23e30 commit 31739ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class FaviconsWebpackPlugin {
compiler.inputFileSystem.statSync(defaultLogo);
this.options.logo = defaultLogo;
} catch (e) {}
// @ts-ignore
assert(
typeof this.options.logo === 'string',
'Could not find `logo.png` for the current webpack context'
Expand Down Expand Up @@ -179,7 +180,7 @@ class FaviconsWebpackPlugin {
.createHash('sha256')
.update(content.toString('utf8'))
.digest('hex');
const outputPath = compilation.mainTemplate.getAssetPath(
const outputPath = compilation.getAssetPath(
this.options.prefix,
{
hash,
Expand Down

0 comments on commit 31739ec

Please sign in to comment.