Prevent nodemon infinite loop on yarn dev after yarn clean
This commit is contained in:
parent
10bd8bb95e
commit
a97e68289e
@ -2,3 +2,11 @@ const fs = require('fs');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
fs.copyFileSync('package.json', path.join('src', 'package.json'));
|
fs.copyFileSync('package.json', path.join('src', 'package.json'));
|
||||||
|
|
||||||
|
// These dir must exist for nodemon not to loop indefinitely.
|
||||||
|
[
|
||||||
|
'build',
|
||||||
|
'public',
|
||||||
|
].forEach(dir => {
|
||||||
|
if (!fs.existsSync(dir)) fs.mkdirSync(dir);
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user