Open reggi opened 9 years ago
When the following code is processed:
var example = require('example').method()
It results in two references for the same import.
[ { type: 'CJSImport', specifiers: [], start: 13, end: 38, reference: { type: 'MemberExpression', start: 13, end: 38, object: [Object], property: [Object], computed: false }, ast: { type: 'Program', start: 0, end: 80, body: [Object], sourceType: 'script' }, source: { type: 'Literal', reference: [Object], value: 'example', raw: '\'example\'', start: 21, end: 30 } }, { type: 'CJSImport', specifiers: [], start: 13, end: 31, reference: { type: 'CallExpression', start: 13, end: 31, callee: [Object], arguments: [Object] }, ast: { type: 'Program', start: 0, end: 80, body: [Object], sourceType: 'script' }, source: { type: 'Literal', reference: [Object], value: 'example', raw: '\'example\'', start: 21, end: 30 } } ]
This was super hard to track down :)
Good catch
When the following code is processed:
It results in two references for the same import.
This was super hard to track down :)