Skip to content

Commit ad6dcaf

Browse files
Merge pull request SharePoint#5733 from nanddeepn/patch-46
Build command instead of Serve for library component
2 parents b3388eb + 7859be6 commit ad6dcaf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/spfx/library-component-tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Building solutions with the library component type in SharePoint Framework
33
description: Building solutions with the library component type in SharePoint Framework
4-
ms.date: 2/3/2020
4+
ms.date: 05/15/2020
55
ms.prod: sharepoint
66
localization_priority: Priority
77
---
@@ -52,7 +52,7 @@ localization_priority: Priority
5252
## How to consume a third-party SPFx library (for local testing)
5353

5454
1. Run `npm link` from the root directory of library solution. In this case, it would be from the **corporate-library** folder.
55-
1. Right after creating the symbolic link to your new SPFx library component, don't forget to run at least once `gulp serve`. Compile your library component at least once in order to be able to import it as a module into a different project. Remember that the **package.json** says that `"main": "lib/index.js"`, therefore, that ___location needs to exist prior to any **import** attempt.
55+
1. Right after creating the symbolic link to your new SPFx library component, don't forget to run at least once `gulp build`. Compile your library component at least once in order to be able to import it as a module into a different project. Remember that the **package.json** says that `"main": "lib/index.js"`, therefore, that ___location needs to exist prior to any **import** attempt.
5656
1. This will create a local npm link to the library with the name, which is provided in the **package.json**.
5757
1. Create a web part project in a **separate project folder, so not in the library project folder structure**, following the instructions from [here](https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part#to-create-a-new-web-part-project). Name your web part **CorporateWebPart**.
5858
1. From the root of the new web part folder, run the command `npm link corporate-library`

0 commit comments

Comments
 (0)