Skip to content

Commit 2b544d2

Browse files
committed
add deprecation note to spfx v1.12.1 release notes
- added missing deprecation notice about the "gulp serve" task with a fix for those upgrading pre-v1.12.1 projects to SPFx v1.12.1 - closes SharePoint#6964
1 parent 0777187 commit 2b544d2

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/spfx/release-1.12.1.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: SharePoint Framework v1.12.1 release notes
33
description: Release notes for the SharePoint Framework v1.12.1 release
4-
ms.date: 04/28/2021
4+
ms.date: 05/05/2021
55
ms.prod: sharepoint
66
localization_priority: Priority
77
---
@@ -56,6 +56,20 @@ This release introduces a new property & event in the Web Part API to detect the
5656
- **Gulp v3** is not supported (*neither globally nor locally installed*) when using Node.js v12+.
5757
- **Local workbench is deprecated** - This is the last release that will include support for the local workbench.
5858
- This is the last release that will include a single generator that works for on-prem and SharePoint Online. You'll still be able to create projects for on-prem, just by using the older generator.
59+
- The **gulp serve** task has been deprecated and renamed to **serve-deprecated**. To address this, the **gulpfile.js** in new SPFx v1.12.1 projects has been updated to add an alias **serve** for the renamed **serve-deprecated** task. However, if you're upgrading a project to SPFx v1.12.1, you need to edit your **gulpfile.js** file so the task **gulp serve** will continue to work.
60+
61+
When upgrading SPFx projects to v1.12.1, add the following before the line `build.initialize(require('gulp'));`:
62+
63+
```javascript
64+
var getTasks = build.rig.getTasks;
65+
build.rig.getTasks = function () {
66+
var result = getTasks.call(build.rig);
67+
68+
result.set('serve', result.get('serve-deprecated'));
69+
70+
return result;
71+
};
72+
```
5973

6074
### Gulp versions & Node.js v12+
6175

0 commit comments

Comments
 (0)