From 7b7f290e78110fc90df3f8daf13c2b45491d1938 Mon Sep 17 00:00:00 2001 From: Karol Tyka Date: Wed, 14 Nov 2018 10:56:07 +0100 Subject: [PATCH] Fix publicPath (WebPack 4) --- index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index e0ba625..daca1fa 100644 --- a/index.js +++ b/index.js @@ -153,11 +153,9 @@ module.exports = function (content) { let cb = this.async(); // Generate destination path for font files, dest option from options takes precedence - let opts = this.options || {}; + let opts = this.options || this._compilation.options || {}; - let pub = ( - generatorConfiguration.dest || (opts.output && opts.output.publicPath) || '/' - ); + let pub = (opts.output && opts.output.publicPath) || '/'; let embed = !!params.embed; if (generatorConfiguration.cssTemplate) {