mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 10:55:37 +00:00
Update migration-guide-alpha.26-to-beta.md
Please refer to issue #3971 for this fix
This commit is contained in:
parent
447594684d
commit
25115bef6d
@ -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`
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user