From 429a3c1a58e9548c60bd1d3c7643e2ca25fea7bb Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 28 Aug 2021 16:07:16 +0300 Subject: [PATCH] Remember user-provided strings --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index 202ad2f..1fbe86d 100644 --- a/index.js +++ b/index.js @@ -173,6 +173,12 @@ module.exports = function(babel) { if (path.node.callee.type === 'Identifier' && path.node.callee.name === 'L') { + if (t.isStringLiteral(path.node.arguments[0])) + { + // Remember the user-provided string + addString(path, path.node.arguments[0].value); + addImport(path); + } // Skip the first argument arg0.add(path.node.arguments[0]); }