Created
June 3, 2021 06:38
-
-
Save ktskumar/43561b18e20f1175dbab281d9b9856d2 to your computer and use it in GitHub Desktop.
Upgrade SPFX v1.10.x to V1.12.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Execute in bash | |
----------------------- | |
npm un -S @types/webpack-env @types/es6-promise | |
npm un -D @types/chai @types/mocha | |
npm i -SE @microsoft/[email protected] @microsoft/[email protected] @microsoft/[email protected] @microsoft/[email protected] @microsoft/[email protected] | |
npm i -DE @microsoft/[email protected] @microsoft/[email protected] @microsoft/[email protected] @microsoft/[email protected] [email protected] @microsoft/[email protected] @types/[email protected] @types/[email protected] | |
npm dedupe | |
rm ".editorconfig" | |
./config/copy-assets.json | |
------------------------- | |
Update copy-assets.json deployCdnPath: | |
{ | |
"deployCdnPath": "./release/assets/" | |
} | |
./config/deploy-azure-storage.json | |
---------------------------------- | |
Update deploy-azure-storage.json workingDir: | |
{ | |
"workingDir": "./release/assets/" | |
} | |
./.yo-rc.json | |
------------- | |
Update version in .yo-rc.json: | |
{ | |
"@microsoft/generator-sharepoint": { | |
"version": "1.12.1" | |
} | |
} | |
./.gitignore | |
------------ | |
To .gitignore add the 'release' folder: | |
release | |
./tsconfig.json | |
--------------- | |
Remove tsconfig.json exclude property: | |
{ | |
"exclude": [] | |
} | |
Add es2015.promise lib in tsconfig.json: | |
{ | |
"compilerOptions": { | |
"lib": [ | |
"es2015.promise" | |
] | |
} | |
} | |
Remove es6-promise type in tsconfig.json: | |
{ | |
"compilerOptions": { | |
"types": [ | |
"es6-promise" | |
] | |
} | |
} | |
Add to the tsconfig.json include property: | |
{ | |
"include": [ | |
"src/**/*.tsx" | |
] | |
} | |
./gulpfile.js | |
------------- | |
Before 'build.initialize(require('gulp'));' add the serve task: | |
var getTasks = build.rig.getTasks; | |
build.rig.getTasks = function () { | |
var result = getTasks.call(build.rig); | |
result.set('serve', result.get('serve-deprecated')); | |
return result; | |
}; | |
./tslint.json | |
------------- | |
Update tslint.json extends property: | |
{ | |
"extends": "./node_modules/@microsoft/sp-tslint-rules/base-tslint.json" | |
} | |
./package.json | |
-------------- | |
Remove package.json property: | |
{ | |
"engines": "undefined" | |
} | |
./config/package-solution.json | |
------------------------------ | |
In package-solution.json add developer section: | |
{ | |
"solution": { | |
"developer": { | |
"name": "Contoso", | |
"privacyUrl": "https://contoso.com/privacy", | |
"termsOfUseUrl": "https://contoso.com/terms-of-use", | |
"websiteUrl": "https://contoso.com/my-app", | |
"mpnId": "000000" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment