-
Notifications
You must be signed in to change notification settings - Fork 26
Description
🎯 Aim of the feature
The current SPFx project detection relies completely on .yo-rc.json files, which creates a couple of issues:
- Sample Gallery missing valid samples - The
prepare-sample-data.ps1script skips samples that don't have this file. The sample gallery's primary purpose is to provide developers with various real-world examples for learning and inspiration. By excluding valid SPFx projects due to this missing file, we are reducing the number of available community samples. - Extension fails to detect valid SPFx project - SPFx solutions can function without a
.yo-rc.jsonfile and still build, bundle, and package successfully using npm scripts, the SPFx Toolkit extension hides the Tasks view because it relies on this file to validate the project.
This scope of this issue is to identify key SPFx indicators that are required for all SPFx project types (WebParts, Extensions, Libraries, ACEs) and implement multi-layer SPFx detection solution.
As mentioned in the comment below, the @microsoft/sp-core-library package appears to be a consistent and mandatory dependency for all valid SPFx projects. Let's verify that all SPFx component types (Web Part, Extension, Library, ACE) consistently include this package and then proceed with updating the detection logic to use this package as the primary SPFx indicator, with current .yo-rc.json as a fallback.
files to update:
- prepare-sample-data.ps1
- CommandPanel.ts - isSPFxProject()
📷 Images (if possible) with expected result
No response
🤔 Additional remarks or comments
No response