
Explanation

Step 1: pac solution init --publisher-name <publisher> --publisher-prefix <prefix> Create a new solutions project using the following command. The solution project is used for bundling the code component into a solution zip file that is used for importing into Dataverse.
pac solution init --publisher-name developer --publisher-prefix dev
Step 2: pac solution add-reference --path <control-path>
Once the new solution project is created, refer the Solutions folder to the location where the created sample component is located. You can add the reference using the command shown below. This reference informs the solution project about which code components should be added during the build. You can add references to multiple components in a single solution project.
pac solution add-reference --path c:\downloads\mysamplecomponent
Step 3: msbuild /t:build /restore
To generate a zip file from the solution project, go into your solution project directory and build the project using the following command. This command uses MSBuild to build the solution project by pulling down the NuGet dependencies as part of the restore. Use the /restore only for the first time when the solution project is built. For every build after that, you can run the command msbuild.
msbuild /t:build /restore
Reference:
https://docs.microsoft.com/en-us/powerapps/developer/component-framework/import-custom-controls