
Explanation
Graphical user interface, text, application, email Description automatically generated

Step 1: Create a solution
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: Add a solution reference to the project
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: Build the project and solution
To generate a zip file from the solution project, go into your solution project directory and build the project using the following command.
msbuild /t:build /restore
Step 4: Deploy the solution
Reference:
https://docs.microsoft.com/en-us/powerapps/developer/component-framework/import-custom-controls