Update migration-guide-alpha.26-to-beta.md

Please refer to issue #3971 for this fix
This commit is contained in:
Lydia 2019-11-13 20:07:09 +11:00 committed by GitHub
parent 447594684d
commit 25115bef6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,7 +190,54 @@ build
## Migrating `config`
You can leave all your files in `./config` unchanged but remove the `server.autoReload` key in `./config/environments/**/server.json`.
### Remove the `server.autoReload` key
You need to remove the `server.autoReload` key in `./config/environments/**/server.json`.
### Bootstrap function
The function exported in `config/functions/bootstrap.js` previously received a callback. This is not the case anymore. You can either use an async function, return a promise or simply run a synchronous function.
**Before**
```js
module.exports = cb => {
cb();
};
```
**After**
**Async**
```js
module.exports = async () => {
await someOperation();
};
```
**Promise**
```js
module.exports = () => {
return new Promise(/* ... */);
};
```
**Sync**
```js
module.exports = () => {
someSyncCode();
};
```
**No Function**
```js
module.exports = () => {};
```
## Migrating `plugins`