You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/spfx/web-parts/get-started/use-fabric-react-components.md
+7-57Lines changed: 7 additions & 57 deletions
Original file line number
Diff line number
Diff line change
@@ -59,14 +59,18 @@ You can also follow these steps by watching this video on the SharePoint PnP You
59
59
60
60
At this point, Yeoman installs the required dependencies and scaffolds the solution files. This might take a few minutes. Yeoman scaffolds the project to include your DocumentCardExample web part as well.
61
61
62
-
6. When initial scaffolding is completed, enter the following to explicitly install the 5.x version of the Office UI Fabric to your solution:
62
+
6. When initial scaffolding is completed, you may need to explicitly add a version of office-ui-fabric-react to your package.json file. If you are using version 1.8.2 or later of the generator, you won't need to worry about this, but older versions will. Open your package.json file, and look for an entry for 'office-ui-fabric-react'. If there isn't one, add the following entry in your dependencies section
followed by the following command at your command prompt.
68
+
```
69
+
npm install
66
70
```
67
71
68
72
> [!NOTE]
69
-
> Starting with SharePoint Framework 1.8, you can use either Office UI Fabric version 5 or version 6. In this case we are using specifically Office UI Fabric version 5.132.0, so we are adding the needed dependency on it. If you would be using Office UI Fabric version 6.x, you'd also need to update the used TypeScript version of the solution.
73
+
> Starting with SharePoint Framework 1.8, you can use either Office UI Fabric version 5 or version 6. In this case we are using specifically Office UI Fabric version 5.132.0, so we are adding the needed dependency on it. If you would be using Office UI Fabric version 6.x, you'd also need to update the used TypeScript version of the solution. To use fabric 6, you need to be on at least rush-stack-compiler-2.9 . The default project created with version 1.8.2 for SharePoint Online will use rush-stack-compiler-2.9 and fabric 6 (and won't need the step to add office-ui-fabric-react to your package.json file). Previous versions use either rush-stack-compiler 2.7 or a build system that is locked to typescript 2.4. In those cases, you'll need to reference fabric 5.132.0. If you are targeting on-prem, you will also want to use fabric 5.132.0.
70
74
71
75
72
76
7. Next, enter the following to open the web part project in Visual Studio Code:
@@ -187,60 +191,6 @@ Because we chose React as our framework when creating the solution, the generato
5.Noticetheuseoftherelativepathwitha`require`statementtoloadimages. Currently, you need to perform a small configuration in the gulpfile.js to enable these images to get processed properly by webpack.
191
-
192
-
6. Open **gulpfile.js** from the **root** folder.
193
-
194
-
7. Add the following code just above the `build.initialize(gulp);` code line.
0 commit comments