From 978e02eb22d9e50d7fb8ddc5580f4defd45a5c33 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Sat, 1 Jun 2019 22:24:01 +0300 Subject: [PATCH] Allow to customize base resources root for rendered text images --- webpack-utils/extended-translations-loader/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webpack-utils/extended-translations-loader/index.js b/webpack-utils/extended-translations-loader/index.js index 4e467ce..3c5882d 100644 --- a/webpack-utils/extended-translations-loader/index.js +++ b/webpack-utils/extended-translations-loader/index.js @@ -14,7 +14,6 @@ module.exports = async function(content) { const callback = this.async(); - const { publicPath } = this._compiler.options.output; const ROOT_PATH = path.join(this.rootContext, 'src'); const localeName = path.basename(this.resourcePath, `.${this.resourcePath.split('.').pop()}`); @@ -40,7 +39,7 @@ module.exports = async function(content) { return; } - global.__webpack_public_path__ = publicPath; // eslint-disable-line camelcase + global.__webpack_public_path__ = ''; // eslint-disable-line camelcase const { src, width, height } = this.exec(module, fileName); Reflect.deleteProperty(global, '__webpack_public_path__'); @@ -111,7 +110,7 @@ module.exports = async function(content) { translations[key] = await examine(key, json[key]); return translations; - }, Promise.resolve({}))); + }, Promise.resolve({}))).replace(/(