Skip to content

spfx project externalize

Externalizes SharePoint Framework project dependencies

Usage

spfx project externalize [options]

Options

Option Description
--help output usage information
-f, --outputFile [outputFile] Path to the file where the report should be stored in
-o, --output [output] Output type. json|text|md. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Important

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.

Remarks

Attention

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/office365-cli/issues.

The 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.

Examples

Get instructions to externalize the current SharePoint Framework project dependencies and save the findings in a Markdown file

spfx project externalize --output md --outputFile deps-report.md

Get instructions to externalize the current SharePoint Framework project dependencies and show the summary of the findings in the terminal

spfx project externalize