Skip to content

spfx project rename

Renames SharePoint Framework project

Usage

m365 spfx project rename [options]

Options

-n, --newName <newName>
New name for the project
--generateNewId
Generate a new solution ID for the project
-h, --help
output usage information
--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples
-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 that you want to rename is located.

Remarks

This command will update the project name in: package.json, .yo-rc.json, package-solution.json, deploy-azure-storage.json and README.md.

Examples

Renames SharePoint Framework project to contoso

m365 spfx project rename --newName contoso

Renames SharePoint Framework project to contoso with new solution ID

m365 spfx project rename --newName contoso --generateNewId