Skip to content

Commit

Permalink
latest greenwood compat test
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Apr 29, 2024
1 parent 8276ca1 commit e2e5fd2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin-css-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ function walkAllImportsForCssModules(scriptUrl, sheets, scope) {
})
// sheets.push(cssContents);
} else if(node.source.value.endsWith('.js')) {
console.log('go recursive for', value);
console.log('go recursive for', {scriptUrl, value});
const recursiveScriptUrl = new URL(value, scriptUrl);

walkAllImportsForCssModules(recursiveScriptUrl, sheets);
if(fs.existsSync(recursiveScriptUrl)) {
walkAllImportsForCssModules(recursiveScriptUrl, sheets);
}
}
},
});
Expand Down

0 comments on commit e2e5fd2

Please sign in to comment.