spfx project externalize¶
Externalizes SharePoint Framework project dependencies
m365 spfx project externalize [options]
-f, --outputFile [outputFile]
- Path to the file where the report should be stored in
- output usage information
- JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
- Output type.
- Runs command with verbose logging
- Runs command with debug logging
Run this command in the folder where the project for which you want to externalize dependencies is located. This command doesn't change your project files.
This command is in preview and could change once it's officially released. If you see any room for improvement, we'd love to hear from you at https://github.com/pnp/cli-microsoft365/issues.
spfx project externalize command helps you externalize your SharePoint Framework project dependencies using the unpkg CDN.
This command doesn't change your project files. Instead, it gives you a report with all steps necessary to externalize your project dependencies. Externalizing project dependencies is error-prone, especially when it comes to updating your solution's code. This is why at this moment, this command produces a report that you can use yourself to perform the necessary changes and verify that everything is working as expected.
Get instructions to externalize the current SharePoint Framework project dependencies and save the findings in a Markdown file
m365 spfx project externalize --output md > "deps-report.md"
Get instructions to externalize the current SharePoint Framework project dependencies and show the summary of the findings in the terminal
m365 spfx project externalize