Remember user-provided strings
parent
554a60abf5
commit
429a3c1a58
6
index.js
6
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]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue