Open dr-BEat opened 3 months ago
I worked around this issue by adding a postinstall script to my package.json to delete the offending php file from the node_modules folder after install.
{
"scripts": {
...
"postinstall": "rimraf node_modules/flatted/php"
...
}
}
Maybe this helps somebody.
We appreciate your insight, @dr-BEat. Your analysis is accurate and we’re currently exploring this area. Anticipate improvements in the near future.
I recently noticed that my Azure Static Web App project which uses node and typescript gets detected as node and PHP.
After some investigation I found that the npm package flatted ships some php (and other languages) files. Which trigger the PhpPlatformDetector to report the whole project as being PHP. While it can be discussed if PHP files should be part of a node package the much much larger issue is that Oryx is scanning the usually quite large node_modules folder in projects. And not once, but for every single IPlatformDetector implementation at least once. That is a colossal waste of time.
There is no way to exclude the node_modules folder from these searches either.
Am I missing something? This seems like a huge oversight.