We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad56372 commit 3bbbfd4Copy full SHA for 3bbbfd4
1 file changed
index.js
@@ -26,9 +26,6 @@ const fileNodes = {};
26
27
function getModuleInfo(moduleId, parser) {
28
if (!moduleInfos[moduleId]) {
29
- const moduleInfo = moduleInfos[moduleId] = {
30
- namedExports: {}
31
- };
32
if (!fileNodes[moduleId]) {
33
const absolutePath = path.join(process.cwd(), moduleRoot, moduleId + '.js');
34
if (!fs.existsSync(absolutePath)) {
@@ -37,6 +34,9 @@ function getModuleInfo(moduleId, parser) {
37
const file = fs.readFileSync(absolutePath, 'UTF-8');
38
35
fileNodes[moduleId] = parser.astBuilder.build(file, absolutePath);
39
36
}
+ const moduleInfo = moduleInfos[moduleId] = {
+ namedExports: {}
+ };
40
const node = fileNodes[moduleId];
41
if (node.program && node.program.body) {
42
const classDeclarations = {};
0 commit comments