From bdf6d79c3532085d5ecbed601b8972ef526a507b Mon Sep 17 00:00:00 2001 From: Razvan Stoenescu Date: Thu, 28 May 2020 18:20:15 +0300 Subject: [PATCH] fix(app): Import + rename from quasar #7126 --- app/lib/webpack/loader.transform-quasar-imports.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/lib/webpack/loader.transform-quasar-imports.js b/app/lib/webpack/loader.transform-quasar-imports.js index fb9d148af60..5b3184f2376 100644 --- a/app/lib/webpack/loader.transform-quasar-imports.js +++ b/app/lib/webpack/loader.transform-quasar-imports.js @@ -8,12 +8,13 @@ module.exports = content => content.replace( (_, match) => match.split(',') .map(identifier => { const data = identifier.split(' as ') - const name = data[0].trim() - const as = data[1] === void 0 - ? '' - : ` as ${data[1]}` - return `import ${name}${as} from '${importTransform(name)}';` + if (data[1] !== void 0) { + return `import ${data[1].trim()} from '${importTransform(data[0].trim())}';` + } + + const name = data[0].trim() + return `import ${name} from '${importTransform(name)}';` }) .join('') )