Stack Exchange
How to tell a spfx solution is compatible with SP2016, SP2019 or Online?
Our ex-developer have several folders with spfx solutions. No documentation is provided for them.
Could I simply identify the compatibility by package.json file?

"@microsoft/sp-core-library": "~1.1.0" <== SP2016
"@microsoft/sp-core-library": "~1.4.0" <== SP2019
"@microsoft/sp-core-library": "~1.11.0" <== SP online


That is almost correct.
Just a some changes as below:
"@microsoft/sp-core-library": "~1.1.0" for SP 2016
"@microsoft/sp-core-library": "~1.1.0" to "~1.4.0"  for SP2019 i.e SPFx v1 to v1.4.1 support for SP 2019
and
"@microsoft/sp-core-library": "~1.1.0" to "~1.11.0" or later <== SP online i.e SP Online supports SPFx v1 to v1.11 and later on
References -
SharePoint Framework development with SharePoint 2016 Feature Pack 2
SharePoint Framework development with SharePoint Server 2019

You could refer to this article: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/compatibility


But how can I check what is the "version" for spfx folders? By using "npm list –g –depth=0" command or by checking package.json?
